Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro to change the colour of a column depending on the contents of
one of the cells in that column. Sub Column_Colour() ActiveCell.Select If ActiveCell = "Allocated" Then Range("H1:H100").Interior.ColorIndex = 36 ElseIf ActiveCell = "In Use" Then Range("H1:H100").Interior.ColorIndex = 37 ElseIf ActiveCell = "Returned" Then Range("H1:H100").Interior.ColorIndex = 43 End If ActiveSheet.Range("A5").Activate End Sub As you can see this is specific only to column "H". How can I change this macro to be available to any column that is selected? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |