VBA: fill cell with colors in another workbook

JennV

New Member
Joined
May 9, 2019
Messages
34
Hello there,

In workbook1 I have the following:

...................Name 1.......Name 2
2019-04-16
2019-04-17
2019-04-18
2019-04-19
2019-04-20
2019-04-21
2019-04-22

In workbook2, I have data as such:

Name 1...........Activity 1.........Activity 2
Start: ............2019-04-16......2019-04-19
End: ..............2019-04-18......2019-04-25

Absences:
2019-04-19
2019-04-21

Is there a way to fill the cells in workbook1 based on the data in workbook2? So for cells B2:B4, it woud be filled as yellow (activity 1), cell B5 would be purple (absent), cell B6 would be blue (activity 2), B7 would be purple (absent), B8 would be blue again (activity 2).

Thank you in advance!
 
Last edited:

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

goesr

Well-known Member
Joined
Nov 15, 2013
Messages
635
Hi JennV - Welcome to the forum. I tried to use conditional formatting across two different workbooks and received the message: "You may not use references to other workbooks for Conditional Formatting criteria." If you explain a little further what exactly you are trying to do someone may have a creative way to accomplish your task, which, on the surface seems doable. Hope this helps.
 

Watch MrExcel Video

Forum statistics

Threads
1,102,711
Messages
5,488,450
Members
407,638
Latest member
brandynl

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top