# value error in Median formual

kvisaria

New Member
Joined
Jun 27, 2007
Messages
27
I am getting #value error when I try below formula. Can someone please advise

=MEDIAN(M7:M7382, IF($C$7:$C$7382,">="&DATE(2013,1,1),OR($C$7:$C$7382,"<="&DATE(2013,12,31))))
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
I am getting #value error when I try below formula. Can someone please advise

=MEDIAN(M7:M7382, IF($C$7:$C$7382,">="&DATE(2013,1,1),OR($C$7:$C$7382,"<="&DATE(2013,12,31))))

You formula looks like an array formula ,but maybe it should look like this?
=MEDIAN(M7:M7382, IF(OR($C$7:$C$7382,">="&DATE(2013,1,1),$C$7:$C$7382,"<="&DATE(2013,12,31)),M7:M7382))

Confirm With Ctrl+Shift+Enter, not just Enter
 
Upvote 0
You formula looks like an array formula ,but maybe it should look like this?
=MEDIAN(M7:M7382, IF(OR($C$7:$C$7382,">="&DATE(2013,1,1),$C$7:$C$7382,"<="&DATE(2013,12,31)),M7:M7382))

Confirm With Ctrl+Shift+Enter, not just Enter

I am getting #value error, do you know why?
 
Upvote 0
Hi

I was a bit to quick there With my answer ;). Lot of errors in my formula. Try this one:
=MEDIAN(IF(OR($C$7:$C$7382>=DATE(2013,1,1),$C$7:$C$7382<=DATE(2013,12,31)),$M$7:$M$7382))
And remember to confirm With Ctrl+Shift+Enter.
 
Upvote 0
I am sorry, it works but didn't realize that its including all the dates in between so its including all the dates that are in 2014 also. Not sure why
Name Date Rate
A 5-Apr-12 12
B 9-Apr-12 13
C 9-Apr-12 14
D 11-Apr-12 15
E 13-Apr-12 16
F 14-Jan-14 20
G 15-Jan-14 21
H 16-Jan-14 22
I 13-Apr-12 17
J 13-Apr-12 18

MEDIAN(IF(OR(B2:B11>=DATE(2012,4,5),B2:B11<=DATE(2012,4,13)),C2:C11))
 
Upvote 0
You're right
I'm Learning something New every day. The OR function can't be used for this purpose. Try this instead:
=MEDIAN(IF(B2:B11>=DATE(2012,4,5),IF(B2:B11<=DATE(2012,4,13),C2:C11)))
And again, remember to confirm With Ctrl+Shift+Enter.
 
Upvote 0

Forum statistics

Threads
1,213,563
Messages
6,114,329
Members
448,564
Latest member
ED38

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