Hi all,
I am trying to insert a variable into a formula. its not returning any error but it selects 5 columns before col value.
Without variable the code is, (active cell column number is 227)
col returns 116 but range selected is 111.
I am trying to insert a variable into a formula. its not returning any error but it selects 5 columns before col value.
Code:
col = .column
Selection.FormulaR1C1 = "=AVERAGEIF(Date,R9C,RC[-" & col & "]:RC[-2])"
Without variable the code is, (active cell column number is 227)
Code:
Selection.FormulaR1C1 = "=AVERAGEIF(Date,R9C,RC116:RC225)
col returns 116 but range selected is 111.