I need to create vba code which will delete a set of ranges and shift cells left IF a certain cell is blank on a row (the range needs to only be deleted for the row with the blank cell). So if TV4 is blank, it needs to delete the respective ranges specified only for the 4th row.
I've created the following code but am running into multiple errors, any help is thoroughly appreciated:
Sub Deleteblanks()
' Deleteblanks Macro
Dim i As Long
For i = 2 To 999999
If IsEmpty(Range("TV" & i)) Then
Range("TV" & i : "AUB" & i).Select
Selection.Delete Shift:=xlToLeft
Range("AOO"&i:"BOU"&i).Select
Selection.Delete Shift:=xlToLeft
Range("BJH"&i:"CJN"&i").Select
Selection.Delete Shift:=xlToLeft
End If
Next i
Range("A1").Select
End Sub