Hi,
I have a macro that checks for empty cells in column A & B and highlight them in red. After the user inputs data into those empty cells that are red now, I want the highlight to be turned off (i.e) the cell background should be white. How can I incorporate this in the macro that I have? The code that I have is given below. Could someone please help me? This is kind of urgent, any help is greatly appreciated. Thanks.
Sub CheckEmpty_New3()
Dim rng As Range
Dim cell As Object
Dim cell1 As Object
Set rng = Range("A7:A" & Range("A" & Rows.Count).End(xlUp).Row)
For Each cell In rng
If cell = "" Then
cell.Interior.ColorIndex = 3
Else
If cell.Value = "N" And Len(Trim(Range(cell.Address).Offset(0, 1).Value)) = 0 Then
cell.Offset(0, 1).Interior.ColorIndex = 3
End If
End If
Next
MsgBox ("Missing Data. Please fill in the cells highlighted in RED")
End Sub
Bookmarks