Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quick! Help With Code Formatting!
I have the following code:
Range("J9:O39").Select Selection.Interior.ColorIndex = 35 When users say go to cell J9 and highlight the cell RED, then when run my macro, i'd like it to skip the formatting that the user inputte and just change the color for the remaining cells in the range... Any ideas?? -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quick! Help With Code Formatting!
"alexm999 " wrote:
I have the following code: Range("J9:O39").Select Selection.Interior.ColorIndex = 35 When users say go to cell J9 and highlight the cell RED, then when I run my macro, i'd like it to skip the formatting that the user inputted and just change the color for the remaining cells in the range... I'm assuming you want to change any cell that have not been changed already (rather than not changing only RED cells) Sub test() Dim Cell As Range Range("J9:O39").Select For Each Cell In Selection If Cell.Interior.ColorIndex = xlNone Then Cell.Interior.ColorIndex = 35 Next Cell End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Quick Code | Excel Discussion (Misc queries) | |||
quick code request | Excel Programming | |||
quick code question | Excel Programming | |||
Quick VBA code question (if...then statement) | Excel Programming | |||
Is there a quick way to see which objects have code attached? | Excel Programming |