Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi I'am trying to create a macro which should change the backround colo
of a cell based on its value in column B. My code is going through, bu it does't do any coloring, whats wrong, am I somehow wrong referring t to the column B? Sub ColorCellBasedOnCellValue() 'Colors a cell in column based on its value Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Dim cell As Range For Each cell In Cells(Rows.Count, "B") Select Case cell.Value Case Is = 20 cell.Interior.ColorIndex = 7 Case Is = 0 cell.Interior.ColorIndex = 7 End Select Next cell Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = False End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing Cell Color Based on Value | Excel Worksheet Functions | |||
Changing the color of a cell based on the color of another cell. | Excel Discussion (Misc queries) | |||
Changing Cell Background Color based on data from another cell | Excel Discussion (Misc queries) | |||
Correct Syntax for Changing Color of Cell Based on Value | Excel Discussion (Misc queries) | |||
Changing background color based on different cell | Excel Discussion (Misc queries) |