Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Find purple cell color, change to red

Select range and the run this macro.


Sub ChangeColor()

Dim rng As Range, c As Range
'
Set rng = Selection
For Each c In rng
If c.Interior.ColorIndex = 13 Then ' Change if not correct value for
ColorIndex
c.Interior.ColorIndex = 3
End If
Next c
End Sub


HTH

"goofy11" wrote:

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change the color the cell becomes when doing a FIND Kenny A. Excel Discussion (Misc queries) 4 April 6th 10 09:05 PM
How do I change the color coding with Find & Replace? JimG Excel Discussion (Misc queries) 2 February 11th 09 12:33 AM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
How do I find highest number in a row and change color? pamstolen Excel Worksheet Functions 3 January 18th 05 12:35 AM
Browse Forms Controls and change TextBox color based on cell color StefanW Excel Programming 2 November 21st 04 07:06 PM


All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"