LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default Need help troubleshooting code which changes the color of a cell

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cell selection troubleshooting Moraga Betty Excel Discussion (Misc queries) 3 April 19th 10 09:17 PM
conditional formatting w/ more than 3 conditionas, color code to a different cell oldbarnes About this forum 0 May 24th 07 01:27 AM
Remove Cell Color after Code is Deleted [email protected] Excel Discussion (Misc queries) 4 February 20th 07 07:37 PM
how to color code a row of cells based on a specific cell value Parker1333 New Users to Excel 1 February 2nd 05 08:01 AM
excel: How can I color code rows based on a value in a cell? Parker1333 Excel Discussion (Misc queries) 2 February 1st 05 10:37 PM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"