Conditional Formatting copy to all sheets

falcios

Active Member
Joined
Aug 30, 2006
Messages
279
Office Version
  1. 2019
Platform
  1. Windows
=COUNTIF(A$1:A$45,TODAY())>0

I have 52 sheets to represent weeks of the year. The sheet that has the current date should he highlighted as per the the above formula.
I have created a new rule in conditional formatting for about 10 sheets. Is there an easier way to copy this formula to all sheets?

Thanks in advance.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Turn on your VBA recorder and record yourself applying it to one sheet.
Then, stop your recorder and view your code. Now, you can put it in a loop to cycle through all your sheets and apply your rule to each one, i.e.
Rich (BB code):
Sub MyFormat()

    Dim ws As Worksheet
    
    Application.ScreenUpdating = False
    
    For Each ws In Worksheets
        ws.Activate
        'The body of your recorded code here
    Next ws
    
    Application.ScreenUpdating = True
    
End Sub
 
Upvote 0
Joe4. Thanks so much for your response.

Can this be done without VBA?
 
Upvote 0
Joe4. Thanks so much for your response.

Can this be done without VBA?
If you already have the 52 sheets created, I don't think so.
This is precisely what VBA is used for - to automate things!
The good news that once you run the VBA once and create all the necessary Conditional Formatting, you shouldn't have to run the VBA again.
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,143
Members
449,098
Latest member
Doanvanhieu

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