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:

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top