Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
But here is a really really basic macro that will change it to red i
the active cell's value is greater than 5, change to blue if less tha 5, or change to black (automatic) if it equals 5. I don't know how t have it work over an entire selection instead of just the active cell I'm sure someone else can help out with that, but what I do is jus start recording a macro, assign a shortcut key to it (like "r") an this macro will automatically drop down to the next cell below th active one after running the macro (activecell.offset(1,0). Sub Colorchange() If ActiveCell 5 Then 'Change the 5 to you value ActiveCell.Interior.ColorIndex = 3 'ColorIndex 3 = red Else If ActiveCell < 5 Then 'Change the 5 to you value ActiveCell.Interior.ColorIndex = 5 'ColorIndex 5 = blue Else If ActiveCell = 5 Then 'Change the 5 to you value ActiveCell.Interior.ColorIndex = 1 'ColorIndex 1 = black End If End If End If ActiveCell.Offset(1, 0).Select End Sub By setting this macro to a keyboard shortcut you can easily jump dow the column, if you want to scroll across rows then change th Offset(1,0) to Offset(0,1).Select -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Formatting on Range of Cells | Excel Worksheet Functions | |||
Conditional Formatting to a RANGE of cells | Excel Discussion (Misc queries) | |||
Conditional formatting a range of cells. | Excel Discussion (Misc queries) | |||
Conditional formatting for range of cells? | Excel Worksheet Functions | |||
Conditional Formatting a range of cells | Excel Programming |