Sub Conditional Date formatting within specified range from each cell having 7 variables

ANALYSTBANK

Board Regular
Joined
Aug 16, 2013
Messages
58
Dear Valued fellow members,

I've a worksheet having only dates and want conditional formatting. Here I lay down the steps involved, I do not wish to go with conventional conditional formatting, but a macro which can do my job. Kindly guide.

1 Range to be evaluated D3:F20 - This can be kept as used range, starting from column C, Row 3 untill end i.e F20
2 Starting with 'Column C' taking as base column,
Each cell in Column C should be the Base for evaluation against similar dates to be found in a manner, explained below, in subsequent columns, say D-F
3 For, Cell C3 (formula based value in this cell), which is the starting cell, macro should copy the date value, and put in Cell H3. Cell H4:H9 is formula driven and calcuates, 3 days forward, and 3 days backward. (this is to avoid creating variables withing macro, and ease process, i guess)
4 Date value in Range H3:H9, should be within the range of =Today() and someday forward, which is set in cell K2, currently set as 45 days from Today
5 So, If date value in H3:H9 is within the range i.e. >= Today (set in K1), AND ALSO not beyond 45 days from now i.e. <=K2, then
6 Each date value in Cell Range H3:H9 (with above condition) should be compared against each cell starting with Column D, then Column E, and then Column F and so on, and where exact match (Exact date) is found in Column D-F, the respective date should be highlighted

7 Once above is done, Cell C4, should be evaluated, i.e. Date value in C4 should be kept in H3, which will change (thru formula) dates in H4:H9 - days forward and backward
8 Now this revised range H3:H9 with condition of date within the range as given in 5 above should be repeated,
9 Same as 6 above


10 And so on for each cell range (used row range) in Column C (C5, then C6, then C7, until blank row is hit in column C) against all subsequent columns D-F


In practice, I would have row over 100+ in bottom, and Column across upto M or O to the right

My worksheet looks like as under - link - http://imgur.com/iyz8J8m or http://i.imgur.com/iyz8J8m.jpg



iyz8J8m.jpg
 
Last edited:

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,217,365
Messages
6,136,123
Members
449,993
Latest member
Sphere2215

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