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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,203
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)
 

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Possibly numbers in column B are text formatted? Try

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

jrudner

Board Regular
Joined
Jul 16, 2008
Messages
100

ADVERTISEMENT

Barry, that gives me the #NUM! error as well.
 

AusSteelMan

Board Regular
Joined
Sep 4, 2009
Messages
208
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
 

jrudner

Board Regular
Joined
Jul 16, 2008
Messages
100
That worked! When I put the single quote around the worksheet name it worked properly. Strange, but thanks a ton!

JRudner
 

Watch MrExcel Video

Forum statistics

Threads
1,129,804
Messages
5,638,455
Members
417,025
Latest member
MusterDuster

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
Top