Return interior fill color
Posted by Annette on February 28, 2001 7:00 PM
This was a follow-up a ways down - I copied it up to reply... See my reply following the text below:
Hmmm, I'm not this is what you want, but this code will check the first 2500 Rows of the active sheet. If the entire row has a color index as stated then it will put the Color index number into the first cell of that row.
Sub CheckRows()
Dim i As Integer
Application.ScreenUpdating = False
For i = 1 To 2500
Select Case Rows(i).Interior.ColorIndex
Case 50
Rows(i).Cells(1, 1) = 50
Case 10
Rows(i).Cells(1, 1) = 10
Case 42
Rows(i).Cells(1, 1) = 42
Case 40
Rows(i).Cells(1, 1) = 40
Case 35
Rows(i).Cells(1, 1) = 35
End Select
Next i
Application.ScreenUpdating = True
End Sub
Any Good ?
BTW it is only by chance I scrolled down this far. It is usually a good idea to re-post your question after 24 hours.
Dave
Yay! We're almost there! Thank you so much! It worked on the rows that are one solid color all the way across. We're tripping up by checking the whole row. Can we check just one field in a row using something such as "B(i)" to indicate which cell to reference?
The problem is that columns 'I' and 'Q' have other colors for notation of special problems. The color index I need to return is always the same for columns A thru H.
P.S. Do you prefer flowers, chocolate, or coffee? :-)