Find Date Then Change Formatting of Some Cells in Column

dnahawks

Board Regular
Joined
Jul 11, 2005
Messages
50
Greetings Experts,

Probably a simple problem for you:

I have a spreadsheet with 12 sheets (one for each month) and the complete dates across the top.

I am working on a UserForm that requests the user to pick corporate holidays from a Calendar. These dates are then the values of textbox's (TxtHoliday1, etc).

My next step is to search the date rows of each of the 12 sheets for any dates that are listed as holidays (values in the TxtHolidayX). When a match is found, I would like to change the formatting of SOME of the cells in that column. For example, if TxtHoliday1 = 12/25/2007, VBA will find that cell on Sheets("Dec") and Cell(A25). It should then change the format of B25, E25, H25, etc. to a shaded gray and read "HOL".

Does that make sense? I would post code, but I'm not even sure where to start!

Thanks! You all are amazing!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,171,733
Messages
5,877,177
Members
433,236
Latest member
Yelnats23

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