calculating median of one range based on conditions in another range

rokoexcel

New Member
Joined
Jan 24, 2018
Messages
2
Hi,

I have two columns with numbers, let's call them A & B, and need to calculate the median of numbers in B that are associated with A's greater than 1. Doing this in one step with "median if" array (=MEDIAN(IF($B$4:$B$3288>"1",$C$4:$C$3288, )) resulted in 0, but doing it in two steps, with a helper column resulted in -0.02. Both methods appear identical to me, though the results are different.

What is the correct method?

Thank you!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
=MEDIAN(IF(B4:B3288>=1,C4:C3288))
press Shift+Ctrl+Enter simultaneously. It be added "{}" automatically.
 
Last edited:
Upvote 0
=MEDIAN(IF(B4:B3288>=1,C4:C3288))
press Shift+Ctrl+Enter simultaneously. It be added "{}" automatically.

Thank you Takae.

I had already tried C+S+E. I did figure it out. It turns I needed to ensure the formula replaced all FALSE with blank space, instead of 0, with the following formula.

{MEDIAN(IF(B4:B3288>=1,C4:C3288, "")}

Thanks for your feedback anyway!
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,854
Members
449,096
Latest member
Erald

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