Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find purple cell color, change to red
I'm new to VBA and am interesting in having macro that after highlighting a
range of cells, would evaluate each cell's color. For every cell that is purple, I want it to be changed to red. Thanks, Jeff |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find purple cell color, change to red
Try this code:
13 is the number for violet. 3 is the number for red. To capture the number for purple - record a macro while you change a cell color to purple... Dim cel As Range For Each cel In Selection If cel.Interior.ColorIndex = 13 Then cel.Interior.ColorIndex = 3 End If Next To test for colors try this code. It will color each cell and the color number will be the same as the row number. Note that after 56 it creates an error... Dim cel As Range For Each cel In Range("A1:A56") cel.Interior.ColorIndex = cel.row End If Next -- steveB Remove "AYN" from email to respond "goofy11" wrote in message ... I'm new to VBA and am interesting in having macro that after highlighting a range of cells, would evaluate each cell's color. For every cell that is purple, I want it to be changed to red. Thanks, Jeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change the color the cell becomes when doing a FIND | Excel Discussion (Misc queries) | |||
Excel: Syntax to change cell color based on color of another cell | Excel Worksheet Functions | |||
Find purple cell color, change to red | Excel Programming | |||
How do I find highest number in a row and change color? | Excel Worksheet Functions | |||
Browse Forms Controls and change TextBox color based on cell color | Excel Programming |