Hello,
I'm having a problem referencing set variables and ranges in my formula:
This works fine but I would like it to be dynamic as the data range and condition changes.
I would like the '=11' condition to be equal to '=month_value' which is a defined integer and the ranges 'Data!C2:C2315' & 'Data!X2:X2315' to be labelled, defined ranges such as 'range_1' and 'range_2'.
I'm having trouble with the syntax. If anyone could help, I'd be very grateful!
Thanks,
Rach
I'm having a problem referencing set variables and ranges in my formula:
Code:
Selection.FormulaArray = _
"=AVERAGE(IF(MONTH(Data!C2:C2315)=11,Data!X2:X2315))"
This works fine but I would like it to be dynamic as the data range and condition changes.
I would like the '=11' condition to be equal to '=month_value' which is a defined integer and the ranges 'Data!C2:C2315' & 'Data!X2:X2315' to be labelled, defined ranges such as 'range_1' and 'range_2'.
I'm having trouble with the syntax. If anyone could help, I'd be very grateful!
Thanks,
Rach