Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings, I came up with a VBA Code that works precisely as I would like it to. However, I have three columns and a few do not have any data at all. It is those I like to have a supplemental statement put into my VBA where the Rows that have no data any any of the three columns on the same row will not be filled. Some rows I have data in column A and no data in Column C; those are fine. It's when there is no data at all in any of the three Columns I don't want the cell filled. Thank you,
VBA Code:
Sub Format_FID_ROWS()
Dim i, Count As Long
Dim wsAct As Worksheet
Set wsAct = ActiveSheet
Application.ScreenUpdating = False
With Sheets("Inbound FIDS")
.Activate
i = 1
Count = Sheets("Inbound FIDS").Cells(Rows.Count, "A").End(xlUp).Row
Do While i <= Count
Range(Cells(i, 1), Cells(i, 3)).Interior.Color = RGB(45, 45, 185)
i = i + 1
If i > Count Then
Exit Do
End If
Range(Cells(i, 1), Cells(i, 3)).Interior.Color = RGB(34, 34, 147)
i = i + 1
Loop
End With
wsAct.Activate
Application.ScreenUpdating = True
End Sub