Locate Blue Cells in Col F then CHANGE value to 0% using VBA

ChrisOK

Well-known Member
Joined
Mar 26, 2003
Messages
601
Need VBA code to start with row 5 and look through COL F for any blue cells, IF=BLUE change the percent to 0% for that cell.
The RGB color code for this particular shade of blue is: Red 153, Green 204, Blue 255.
 
Try This..

Code:
    With Application.FindFormat
        .Clear
        .Interior.Pattern = xlSolid
        .Interior .Color = 16764057
        .Locked = True
    End With
    Range("F5:F" & Range("F" & Rows.Count).End(xlUp).Row).Replace What:="", _
        Replacement:="0%", LookAt:=xlWhole, SearchFormat:=True
    Application.FindFormat.Clear
 
Upvote 0
FANTASTIC! Works like a charm, *with one edit needed here: .Interior .Color = 16764057
There's a extra space between 'Interior' and 'Color' that needed removed -- just FYI for anyone else who might find this code helpful for their use...
Thanks vds1 ! I've clicked *LIKE* to make sure you got 'kudos'...
C.
 
Upvote 0

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