Hello,
I am trying to use an If Then Loop, but I cannot seem to get it to function properly
Final Product:
Excel will look at Column AN and if the cell value is True, then it will select the entire row and color it orange. Then it will go down to the next cell and check, until it reaches a blank cell.
Here is my current code
I think my problem may be the ActiveCell.EntireRow.Select, but I am not certain how to fix it.
I have been searching through forums and google for a while now, with this being the 15th iteration of code, to no avail.
I am trying to use an If Then Loop, but I cannot seem to get it to function properly
Final Product:
Excel will look at Column AN and if the cell value is True, then it will select the entire row and color it orange. Then it will go down to the next cell and check, until it reaches a blank cell.
Here is my current code
Code:
Dim i As Long
i = 1
Do While Cells(i, "AN").Value <> ""
If Cells(i, "AN").Value = "True" Then
ActiveCell.EntireRow.Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 820980
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
i = i + 1
Loop
I think my problem may be the ActiveCell.EntireRow.Select, but I am not certain how to fix it.
I have been searching through forums and google for a while now, with this being the 15th iteration of code, to no avail.