I have this code that works fine to highlight, but I don't know how to get it to be a conditional format and to go back to not being highlighted once the condition is met.
Sub HighlightFirstNameLastNameRows()
lastRow = ActiveSheet.Range("A" & Rows.count).End(xlUp).Row
Dim i As Long
For i = 2 To lastRow
If Range("F" & i) = UCase(Range("F" & i)) And Not IsEmpty(Range("F" & i)) Or Range("F" & i) = LCase(Range("F" & i)) And Not IsEmpty(Range("F" & i)) Or Range("G" & i) = UCase(Range("G" & i)) And Not IsEmpty(Range("G" & i)) Or Range("G" & i) = LCase(Range("G" & i)) And Not IsEmpty(Range("G" & i)) Or IsEmpty(Range("F" & i)) Or IsEmpty(Range("G" & i)) Or 1 = Len(Range("F" & i)) Or 1 = Len(Range("G" & i)) Then
Rows(i).Interior.Color = RGB(255, 255, 204)
End If
Next i
End Sub
Sub HighlightFirstNameLastNameRows()
lastRow = ActiveSheet.Range("A" & Rows.count).End(xlUp).Row
Dim i As Long
For i = 2 To lastRow
If Range("F" & i) = UCase(Range("F" & i)) And Not IsEmpty(Range("F" & i)) Or Range("F" & i) = LCase(Range("F" & i)) And Not IsEmpty(Range("F" & i)) Or Range("G" & i) = UCase(Range("G" & i)) And Not IsEmpty(Range("G" & i)) Or Range("G" & i) = LCase(Range("G" & i)) And Not IsEmpty(Range("G" & i)) Or IsEmpty(Range("F" & i)) Or IsEmpty(Range("G" & i)) Or 1 = Len(Range("F" & i)) Or 1 = Len(Range("G" & i)) Then
Rows(i).Interior.Color = RGB(255, 255, 204)
End If
Next i
End Sub