This was my previous post Insert COUNTIF formula when you have variable holding the value.
Below was the Solution.
Range("Q" & minRow + 1).Formula = "=COUNTIF(P$" & minRow & ":P" & minRow & ",P" & minRow + 1 & ")=0"
I have a new Question. What if the column is a variable?
What is the syntax if both are Variables (column and row are unknown and their values stored in a variable) and what is the syntax if column is variable and row is a number?
I have tried these ways
"=COUNTIF( & Columnz $1: & Columnz &2 ,& Columnz &2000)=0"
and these way
"=COUNTIF( "& Columnz" $1: " & Columnz"2,& Columnz &2000)=0"