Hello all,
I have a file in the following format where a rows has some headers, let's say Name, Age and Gender. Now every time the code comes across the word "Gender", it fills up a certain formula in the 11 rows below the sub-header "1":
I have the following code, but doesn't work at all:
I have a file in the following format where a rows has some headers, let's say Name, Age and Gender. Now every time the code comes across the word "Gender", it fills up a certain formula in the 11 rows below the sub-header "1":
I have the following code, but doesn't work at all:
VBA Code:
Sub Macro4()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
ThisWorkbook.Worksheets("CSD Trend").Activate
Dim x As Integer
For Each Row In Range("M12:SJ12")
'Update formulas
If ActiveCell.Value = "Station" Then
ActiveCell.Offset(2, 0).Select
Range(Selection, Selection.Offset(10, 0)).FormulaR1C1 = "formula here"
End If
Next
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
End Sub