Light or Dark green? What is the last column? (NT)
Re: Light or Dark green? What is the last column? (NT)
Tom,
Sorry, I was speaking of filling, not font color.
I usually fill with the Neon Green. The column & row numbers change from week to week depending on what sold. Can I just put a far out reference like A500 - as long as I make sure it is beyond the possible range?
David
Re: Light or Dark green? What is the last column? (NT)
Try this:
Sub GrnHghlt()
Dim Cnt As Integer
For Cnt = 1 To 500
If UCase(Range("A" & Cnt)) = "TOTAL" Then
Range("A" & Cnt, "B" & Cnt).Interior.ColorIndex = 4
End If
Next
End Sub
If the color is not right, (this is "bright green" on my spreadsheet, try 43 instead of 4 for "lime green", or 35 for "light green". The line "For cnt..." will go through rows 1 through 500. you can change it to start and stop where you want. The line "If UCase(..." sets the comparison for column "A". If the word totals is in another column, change accordingly. (The "UCase" part makes the word all caps for comparison purposes. It will not change how the word appears on the spreadsheet.) The line with "colorindex" will highlight columns A and B in the row. Change the letters to highlight what you need.
If there is more than 1 row that will have the word "total" that you want to find, let me know and I'll add an "offset" to the macro.
Hope this helps.