VBA Help on Date Validation that compares on the date today and will be highlited

doms123

Board Regular
Joined
Apr 19, 2011
Messages
58
Im using Excel2007 and i have a sheet and a button that checks or compare the date i enter with the date today

example

Name sex validation today
doms male 03/30/11 04/26/11
nicas fema 04/26/11 04/26/11
congi male 04/29/11 04/26/11

then if the date today and the date of validation will be equal the whole row will be highlited in color yellow if the date today hass passes by the date of validation like on the row of doms it the whole row will be higlited with red it means it surpass the validation date.

Please help me with the VBA code that i need to input on the button...

Thank You in Advance....
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
No VBA code needed....

Why not use Conditional Formatting by first selecting the row header 2 to 1000(?),
then on the Home Tab Conditinal Formatting - New Rule... choose Use a formula to determine which cells to format; In the textbox enter =$C2=$D2 then Format... (Button) select Fill - Yellow. OK, OK

You should be back to the Spreadsheet - Do not Unselect your range from above; Now
click on Conditional formatting again, this time Manage Rules, Choose New Rule, then select formula to determine which cells to format; In textbox enter =$C2<$D2 then
Format (Button) select Fill - Red. OK, OK.

Jim
 
Upvote 0

Forum statistics

Threads
1,214,840
Messages
6,121,895
Members
449,058
Latest member
Guy Boot

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