MEDIAN formula returning #VALUE! - Help!

kylc3

New Member
Joined
Jun 16, 2017
Messages
14
Hi!

I'm using the following array formula to find the MEDIAN of a string of values:

{=INDEX($Q$4:$Q$1000,MATCH(MIN(ABS($Q$4:$Q$1000-MEDIAN($Q$4:$Q$1000))),ABS($Q$4:$Q$1000-MEDIAN($Q$4:$Q$1000)),0))}

Row Q is populated with the formula, =IF(ISNUMBER(M4),FV(M4,10,,-100000),""), =IF(ISNUMBER(M5),FV(M5,10,,-100000),""), etc.

I'm using the MEDIAN array formula with several different data sets. The formula works fine if the data set is complete in row Q, meaning that data is populated all of the way to row 1000. But if the data set ends before row 1000 and the formula in row Q returns "", the MEDIAN array formula returns #VALUE!.

Any help to fix this formula would be much appreciated. Thanks!!!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,213,506
Messages
6,114,024
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top