Compare with current date change colour

baskar5353

Board Regular
Joined
Mar 21, 2015
Messages
114
How do you find out if the value in a particular cell is a date? Actually I want to run a conditional formatting on cells.i'm having End date in column "E" i want compare the end date with the current date. how to do in VBA

Criteria1:
Content in the cell should be a proper date. It will be in (dd-mmm-yyyy) format

Criteria2:
If the date is 15 days ahead of today's date, color the background cell in RED
If the date is 30 days ahead of today's date, color the background cell in GREEN
If the date is 60 days ahead of today's date, color the background cell in YELLOW
If the date is 61 days ahead of today's date, DO NOT COLOR
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Any reason why you don't want to do this using normal conditional formatting?

Dom
 
Upvote 0
each and every day i want to RUN this.If in conditional formatting we can do means can tell me how to do
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,773
Members
448,991
Latest member
Hanakoro

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