I need help in proper formula formatting/syntax. I just haven’t been able to debug my formula to calculate a Median.
Here is a similar working formula that calculates an Average:
Formula:
=AVERAGEIFS(OFFSET(INDEX(date_city!1:1,MATCH("Price Per SF",date_city!1:1,FALSE)),0,0,COUNTA(INDEX(date_city!1:65521,,MATCH("Price Per SF",date_city!1:1,FALSE))),1), (OFFSET(INDEX(date_city!1:1,MATCH("Date of Sale",date_city!1:1,FALSE)),0,0,COUNTA(INDEX(date_city!1:65521,,MATCH("Date of Sale",date_city!1:1,FALSE))),1)), ">" & Criteria!$F$4, (OFFSET(INDEX(date_city!1:1,MATCH("Date of Sale",date_city!1:1,FALSE)),0,0,COUNTA(INDEX(date_city!1:65521,,MATCH("Date of Sale",date_city!1:1,FALSE))),1)), "<" & Criteria!$G$4)
I need to modify the above so it calculates a Median.
I’ve tested this simpler formula for proper format and it works:
Formula:
{=MEDIAN(IF((date_city!$I$2:$I$989>Criteria!$F$4)*(date_city!$I$2:$I$989<Criteria!$G$4), date_city!$E$2:$E$221))}
I need to replace "date_city!$I$2:$I$989" and "date_city!$E$2:$E$221" from the above Median formula with their corresponding code from the Average formula.
I tried the following code, but cannot find my errors. Probably incorrect parantheses or comma placement.
Formula:
=MEDIAN(IF((OFFSET(INDEX(date_city!1:1,MATCH("Date of Sale",date_city!1:1,FALSE)),0,0,COUNTA(INDEX(date_city!1:65521,,MATCH("Date of Sale",date_city!1:1,FALSE))),1)) ">" & Criteria!$F$4)*(OFFSET(INDEX(date_city!1:1,MATCH("Date of Sale",date_city!1:1,FALSE)),0,0,COUNTA(INDEX(date_city!1:65521,,MATCH("Date of Sale",date_city!1:1,FALSE))),1)) "<" & Criteria!$G$4), OFFSET(INDEX(date_city!1:1,MATCH("Price Per SF",date_city!1:1,FALSE)),0,0,COUNTA(INDEX(date_city!1:65521,,MATCH("Price Per SF",date_city!1:1,FALSE))),1)
Thanks in advance for any help.
Bookmarks