Link to home
Start Free TrialLog in
Avatar of AckeemK
AckeemK

asked on

Macro to clear all highlighted cells

I am looking to create a macro that clears all cells highlighted except the header row within a worksheet. The highlighted cells are in red and they are just to display changes between two worksheets. I want the user to be able to clear these highlights once the file is saved.
Highlighted-Fields.xlsx
Avatar of Tina K
Tina K
Flag of United States of America image

Range("a2:l35").Select  
    With Selection.Interior
        .Pattern = xlNone
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With

Just change the range selection to match your largest possible range area, or use the range name if you have one set.
Avatar of Saqib Husain
With ActiveSheet.UsedRange.Offset(1).Interior
        .Pattern = xlNone
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
Avatar of AckeemK
AckeemK

ASKER

How do I make it happen for a particular tab? The tab I want it to occur in is called "Current".
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial