I have the following VBA code in Excel:
=====================================================
Sub del_headers()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim rng As Range, ix As Long
Set rng = Intersect(Range("A:A"
, ActiveSheet.UsedRange)
For ix = rng.Count To 1 Step -1
If rng.Item(ix).Interior.ColorIndex = 3 Then
rng.Item(ix).EntireRow.Delete
End If
Next
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
=====================================================
This code will go through column A and delete all the red rows (headers)
(Note: White rows following by red rows are details)
Please take a look at:
My question:
From the above code, how do I modify to get:
Loop through column A
If detail cells are blanked
Copy the formula from its header
Paste this formula into blanked cells (details)
End If
End Loop
Many thanks
XT
=====================================================
Sub del_headers()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim rng As Range, ix As Long
Set rng = Intersect(Range("A:A"
For ix = rng.Count To 1 Step -1
If rng.Item(ix).Interior.ColorIndex = 3 Then
rng.Item(ix).EntireRow.Delete
End If
Next
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
=====================================================
This code will go through column A and delete all the red rows (headers)
(Note: White rows following by red rows are details)
Please take a look at:
My question:
From the above code, how do I modify to get:
Loop through column A
If detail cells are blanked
Copy the formula from its header
Paste this formula into blanked cells (details)
End If
End Loop
Many thanks
XT