I'm trying to use a formula array to do some calculations..
this works..
Range("C" & LastRow + 4).Select
Selection.FormulaArray = _
"=PERCENTILE(IF(L2:L" & LastRow & "=""15"",AC2:AC" & LastRow & "),0.4)"
but when I try to replace the 15 with a variable (year) it just returns a zero or #Value
Range("C" & LastRow + 4).Select
Selection.FormulaArray = _
"=PERCENTILE(IF(L2:L" & LastRow & "=" & year & ",AC2:AC" & LastRow & "),0.4)"
help! thanks.
this works..
Range("C" & LastRow + 4).Select
Selection.FormulaArray = _
"=PERCENTILE(IF(L2:L" & LastRow & "=""15"",AC2:AC" & LastRow & "),0.4)"
but when I try to replace the 15 with a variable (year) it just returns a zero or #Value
Range("C" & LastRow + 4).Select
Selection.FormulaArray = _
"=PERCENTILE(IF(L2:L" & LastRow & "=" & year & ",AC2:AC" & LastRow & "),0.4)"
help! thanks.