Match dates from 1 sheet and then copy the interior colour from a different column to another sheet

danbates

Active Member
Joined
Oct 8, 2017
Messages
371
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Please can someone help me?

On my Shifts sheet I have the dates from 01/01/2023 up to 31/12/2030 running down column A but each date is two cells merged because in column B is the colour of our day & night shifts.

So it reads: 01/01/2023 is in A1, 02/01/2023 is in A3 and so on with the two different interior colours to each date in column B.

On the same sheet I also have a formula that finds the 3rd Sunday of each month for the year 2023. This range is Q1:Q12.

What I would like is a VBA code that can look for each date on my Shifts sheet in the Q1:Q12 range, match them dates in column A and then copy the lower colour in column B to my Monthly sheet. The range is B7:B18.

As an example:
If Q1 was showing the date 01/01/2023 which is in cell A1 then I would need the interior colour copied from B2 to my Monthly sheet B7.

Any help would be appreciated.

Thanks

Dan
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,186,751
Messages
5,959,566
Members
438,434
Latest member
shakaib26

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
Top