Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
This is the last piece of this particular set of macros I need to complete this. If I have a situation on my Flight Information Display (FIDS), where under the row beginning with Destination is blank, I need a VBA where it will insert a colored row under "Destination". The color will be either be the other blue that is not already used. The blue tone used with the date will not be used. In the image the lighter tone of blue would be used in row 11. However there may be times with the row containing "Destination" will be in the lighter blue. The word "NO DEPARTURES" will be in column A of the newly inserted row and the other cells in the row left blank. The font will be white, centered and 28. It may not be necessary to worry about the font for I have a VBA that is used to adjust that. I currently using the VBA given to me, but right now nothing seems to happen.
Thank you,
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("Outbound FIDS")
.Activate
i = 1
Count = Sheets("Outbound FIDS").Cells(Rows.Count, "A").End(xlUp).Row
Do While i <= Count
If Cells(i, 1) = "" And Cells(i, 2) = "" And Cells(i, 4) = "" Then
Else
Range(Cells(i, 1), Cells(i, 4)).Interior.Color = RGB(45, 45, 185)
End If
i = i + 1
If i > Count Then
Exit Do
End If
If Cells(i, 1) = "" And Cells(i, 2) = "" And Cells(i, 4) = "" Then
Else
Range(Cells(i, 1), Cells(i, 4)).Interior.Color = RGB(34, 34, 147)
End If
i = i + 1
Loop
End With
wsAct.Activate
Application.ScreenUpdating = True
End Sub