Conditional Format for Multiple Sheets

RandyD123

Active Member
Joined
Dec 4, 2013
Messages
289
Office Version
  1. 2016
Platform
  1. Windows
I have 12 sheets that I want to apply conditional formatting across them all. I only need to make sure that any cell that has data will be an Arial 14 point Bold font across all sheets. I would like to also exclude just one sheet that I use for a "compile sheet"

Right now I am using conditional formatting for each sheet. Can I do this using VBA code instead?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
If you turn on the Macro Recorder, and record yourself applying the Conditional Formatting to one sheet, you should get most of the VBA code you need to do that part.

Then, just put it in a loop that goes through all your sheets, something like:
Code:
    Dim ws As Worksheet
    
    For Each ws In Worksheets
        If ws.Name <> "compile sheet" Then
            ws.Activate
            'conditional formatting code here
        End If
    Next ws
 
Upvote 0
Does the "compile sheet" have to be the name of each sheet or can I use workbook instead?
 
Upvote 0
Does the "compile sheet" have to be the name of each sheet or can I use workbook instead?
I am afraid your question doesn't make much sense.
You asked how you can apply conditional formatting to all sheets except for one in VBA. Where does "workbook" come in?
Basically, you need to tell it either the sheet name or sheet index to skip over.
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,731
Members
449,093
Latest member
Mnur

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