VBA RC choosing another row

312 Views Asked by At

two worksheets countifs for totaling the data

Range("F3").FormulaR1C1 = "=COUNTIF(data!C2,numbers!RC14)"

from C2 i get all of column B in data. perfect. from RC14 i get column N in numbers...but row 9. i need N3.

im sure its probably something stupid...what am i missing?

1

There are 1 best solutions below

5
AudioBubble On

RC14 is a reference to that same row that the formula is on but in column 14 (column N). If you are getting N9 then your formula is on the 9th row, aka $N9. The R is relative and C14 is an absolute reference to column N.

R[6]C14 refers to column N but 6 rows past the row the formula is on. If the formula is on row 9 then this is $N15. The row is again relative, the column is absolute.

R[-6]C14 refers to 6 rows above the row the formula is on, e.g. $N3.

R3C14 is a row absolute, column absolute reference to $N$3.