Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet with text in one column and a category in the next. I
want to count the uncategorized items, then highlight the cell so it's easy to find. The following code works if I execute the code from the vb window (the value is calculated correctly and blank cells are highlighted). If I recalculate this in the spreadsheet, the value of the cell is updated to the correct number, but the cell colors are not changed. If I set a breakpoint within the if statement, then do a recalculate in the spreadsheet, the breakpoint is hit. If I step through the code the color is changed. Any ideas to help me troubleshoot this? Function CountUncategorized() Count = 0 For RowCount = 10 To 24 Cells(RowCount, 4).Interior.ColorIndex = 0 If (Cells(RowCount, 3) < "" And Cells(RowCount, 4) = "") Then Count = Count + 1 Cells(RowCount, 4).Interior.ColorIndex = 3 End If Next RowCount CountUncategorized = Count End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cell selection troubleshooting | Excel Discussion (Misc queries) | |||
conditional formatting w/ more than 3 conditionas, color code to a different cell | About this forum | |||
Remove Cell Color after Code is Deleted | Excel Discussion (Misc queries) | |||
how to color code a row of cells based on a specific cell value | New Users to Excel | |||
excel: How can I color code rows based on a value in a cell? | Excel Discussion (Misc queries) |