Help with medianif function

jrudner

Board Regular
Joined
Jul 16, 2008
Messages
100
Hi, I know there is an existing median if thread, but it is not resolving the problem I have.

My formula below is as follows:

=MEDIAN(IF(Test!$G$2:$G$13215=B14,Test!$B$2:$B$13215))

I seem to be having difficulties referencing data on another worksheet. The formula is on the same sheet that B14 is on.

I enter it as an array format, but I get #NUM! as a result.

Any help? Thanks in advance,

JRudner
 

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.
If B14 is not available in Test!$G$2:$G$13215, you'd get a #NUM! error...

What do you get with?...

=COUNTIF(Test!$G$2:$G$13215,B14)
 
Upvote 0
Possibly numbers in column B are text formatted? Try

=MEDIAN(IF(Test!$G$2:$G$13215=B14,Test!$B$2:$B$13215+0))
 
Upvote 0
Hi there,

I wish I could be more help, but thought I would let you know that I copy and pasted your formula as is and populated tab name and columns and got a result.

In fact, I got a result when the formula was entered as a CSE array formula and even as a regular formula.

Initially I thought it may have been because you did not have " ' " around your sheet name, but I was wrong with the example you gave. However if your sheet name has a SPACE in it, you will need them. eg

Code:
=MEDIAN(IF('test sheet'!$G$2:$G$13215=B14,'test sheet'!$B$2:$B$13215))

Hope this is useful, even if not directly helping.

ASM
 
Upvote 0
That worked! When I put the single quote around the worksheet name it worked properly. Strange, but thanks a ton!

JRudner
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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