Hi guys, so im having an issue figuring out something. I'm trying to write a code which changes the color of a cell depending on if its greater than or less than a different cell. as a formula, i would have done $E2, however, when i put $E2 in vba, all the cells then reference only E2, i want it to look at the cell in the corresponding row of Column E. I cant do RC- the number of columns because im working on a dynamic sheet that adds columns each month. this is what i have, if it helps
Code:
Range("TableAll[[#Headers],[Fiscal YTD]]").Select
ActiveCell.Offset(1, 1).Select
Range(ActiveCell, Cells(ActiveCell.End(xlDown).Row, ActiveCell.End(xlToRight).Column)).Select
Dim cl As Range
For Each cl In Range(ActiveCell, Cells(ActiveCell.End(xlDown).Row, ActiveCell.End(xlToRight).Column))
If cl >= "" Then
cl.Interior.Color = 5287936
End If
Next cl