vba conditional format dates earlier than or greater than date

Dave8899

New Member
Joined
Jan 17, 2019
Messages
32
Hi I need/want a VBA for conditional formatting that triggers every time the Sheet is Selected

column F is all dates from “H5:H30000”, I need if possible, to have.

  • All blank cells to be White
  • Any cell that is older than XXXX date to go red
  • Any Cell equal to or less than XXXXX date to stay Whist


I have added as normal conditional formatting but as the data is copied and pasted into the list the formatting is wiped

Thanks Dave
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
909
Office Version
  1. 365
Platform
  1. Windows
How is the data pasted into the list? The preferred solution is to manage how the data is pasted rather than using VBA to re-apply the conditional formatting. If you do it manually, then use Paste Values instead of Paste. If you paste with VBA, please show the VBA you use.
 

Dave8899

New Member
Joined
Jan 17, 2019
Messages
32
the issue is there are multiple people pasting in to it, some get it wrong a lot ☹️. Was hoping to add a code to keep adding/ refreshing it.
 

Forum statistics

Threads
1,148,006
Messages
5,744,315
Members
423,861
Latest member
Ka3EeM

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