Hello people,
This might be in the wrong section but please bear with me.Basically I'm trying to use VB to add a formula to the the H column. So what I want is Cells H2 to H(NoDupes.Count+1) to have the formula that says =countif($A:$A,G(i+1)) where i keeps changing in the for loop.
I get a "expected end of statement error at the "G" part in my formula. Anyone have any ideas what I'm doing wrong.
This is the for loop
Thanks a lot
This might be in the wrong section but please bear with me.Basically I'm trying to use VB to add a formula to the the H column. So what I want is Cells H2 to H(NoDupes.Count+1) to have the formula that says =countif($A:$A,G(i+1)) where i keeps changing in the for loop.
I get a "expected end of statement error at the "G" part in my formula. Anyone have any ideas what I'm doing wrong.
This is the for loop
For i = 1 To NoDupes.Count
Range("H" & (i + 1)).Formula = "=COUNTIF($A:$A,"G" & (i+1) )
Next i
Thanks a lot