G
Guest
Guest
Hi,
Basically I am trying to write a macro that writes formulas based on a list of headers
=COUNTIF('Raw Data'!E2:E46, "F02")
the function so far --
With Range("C22")
.FormulaR1C1 = "F02"
.Offset(0, 1).FormulaR1C1 = "=COUNTIF('Raw Data'!R[2]C[1]:R[46]C[1], ""F02"")"
.Offset(0, 2).FormulaR1C1 = "Array Formula"
End With
The formula was recorded using macro recorder. It's not working as the arguments.. R[2]C[1]:R[46]C[1], produced the formula =COUNTIF('Raw Data'!E42:E65534, "F02") instead of =COUNTIF('Raw Data'!E2:E46, "F02"). Help!
Basically I am trying to write a macro that writes formulas based on a list of headers
=COUNTIF('Raw Data'!E2:E46, "F02")
the function so far --
With Range("C22")
.FormulaR1C1 = "F02"
.Offset(0, 1).FormulaR1C1 = "=COUNTIF('Raw Data'!R[2]C[1]:R[46]C[1], ""F02"")"
.Offset(0, 2).FormulaR1C1 = "Array Formula"
End With
The formula was recorded using macro recorder. It's not working as the arguments.. R[2]C[1]:R[46]C[1], produced the formula =COUNTIF('Raw Data'!E42:E65534, "F02") instead of =COUNTIF('Raw Data'!E2:E46, "F02"). Help!