Hi,
I am looking to set up an auto formula macro which i can get to work fine
But the following part of the formula is what i am having trouble with
Cells(i, "H").Formula = "=IF(P1_F_T_0" & x & "="""","""",SUM(H" & a & ":H" & b & ")))"
What i need is
"a" to show 13, "b" to show 23 on the first formula
"a" to show 175, "b" to show 185 on the second formula
"a" to show 337, "b" to show 347 on the third formula
"a" to show 499, "b" to show 509 on the fourth formula
etc, etc
Here's the complete code
Thanks
I am looking to set up an auto formula macro which i can get to work fine
But the following part of the formula is what i am having trouble with
Cells(i, "H").Formula = "=IF(P1_F_T_0" & x & "="""","""",SUM(H" & a & ":H" & b & ")))"
What i need is
"a" to show 13, "b" to show 23 on the first formula
"a" to show 175, "b" to show 185 on the second formula
"a" to show 337, "b" to show 347 on the third formula
"a" to show 499, "b" to show 509 on the fourth formula
etc, etc
Here's the complete code
Code:
Sub AutoFormulaEntry()
x = 1
For i = 26 To 16064 Step 162
Cells(i, "H").Formula = "=IF(P1_F_T_0" & x & "="""","""",SUM(H" & a & ":H" & b & ")))"
x = x + 1
Next i
End Sub
Thanks