I have entered these formula in the second row of the Pth column:
=(COUNTIF(A$1:A1,A2)=0)+(COUNTIF(B$1:B1,B2)=0)+(COUNTIF(F$1:F1,F2)=0)
When I drag it to the third row of the Pth column, it gets like this:
=(COUNTIF(A$1:A2,A3)=0)+(COUNTIF(B$1:B2,B3)=0)+(COUNTIF(F$1:F2,F3)=0)
This is what I do manually. How do I make it using VBA? I have tried in the way below.
cells(Count,"M").formula= "=(COUNTIF(A$1:A1,A2)=0)+(COUNTIF(B$1:B1,B2)=0)+(COUNTIF(F$1:F1,F2)=0)"
But it's not working. It's not changing from
"=(COUNTIF(A$1:A1,A2)=0)+(COUNTIF(B$1:B1,B2)=0)+(COUNTIF(F$1:F1,F2)=0)"
to
"=(COUNTIF(A$1:A2,A3)=0)+(COUNTIF(B$1:B2,B3)=0)+(COUNTIF(F$1:F2,F3)=0)"
How do I insert the formula into the cell when the formula keeps changing with an increase in row?