This is my second week learning VBA, so I'm having a little bit of trouble. I have a spreadsheet that has a mix of hard coded numbers and formulas. I need to color the last hard coded row in the sheet with a dark pink, the 15 rows after that with a lighter pink, and the row after these 15 with the same dark pink. I already set up a formula (=isformula(H593))to tell me if it's hard coded (FALSE) or Formula (TRUE) and then, in the column next to that, I have an IF function for where the darker pink rows should be (=IF(BD593=BD594,"","dark")).
Here is my code for one of the dark rows (which does not work):
Any suggestions? After I figure this first row out, I will move on to the rest, unless you think it should all be in one sub. Also, would there be a way to color part of the row (for instance, columns F:P)?
Here is my code for one of the dark rows (which does not work):
Code:
Sub Color()
'Putting Dark color on bottom row
If Columns("BE").Find(what:="dark", _
after:=Range("BE610").End(xlUp), _
SearchDirection:=xlPrevious).Activate Then
'Color entire row
ActiveCell.EntireRow.Select
Selection.Interior.TintAndShade = 0.599993896298105
Else
'Do nothing
End If
End Sub
Any suggestions? After I figure this first row out, I will move on to the rest, unless you think it should all be in one sub. Also, would there be a way to color part of the row (for instance, columns F:P)?