error message when entering array formula

ariel20029

Board Regular
Joined
Jun 20, 2013
Messages
97
Hi,
I am trying to write an array formula for median if statement.

=median(if(A25:A223="End Customer")*(A25:A223="Partner"),G25:G223)) the hit control shift enter..for the array

excel keep popping up there is a problem with this formula .. not trying to enter a formula.. (

I tried retyping and reentering the formula with no luck. I even tried making end customer and Partner individual cells and reference the cells instead of words that did not help.




Can anyone let me know how to fix this?
thanks,
Sharon
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
I can see two issues in your formula
1. Syntax
A parenthesis is missing before A25
2. Logic
Multiplying the two conditions is equivalent to an AND condition. How can a cell be equal to "End Customer" and "Partner" at the same time?

I think you want equal to "End Customer" OR equal to "Partner". If so, you must add the two conditions, ie
=median(if((A25:A223="End Customer")+(A25:A223="Partner"),G25:G223))
Ctrl+Shift+Enter

M.
 
Upvote 0
A25:A223 can't be both End Customer and Partner. That's what the * will do. If you want it to be OR, then use +.
 
Upvote 0
Hi all,
the formula was from a video on YouTube that said the * acted like an OR statement :) I will try the changes.. thank you so much for your feedback!!!
Have a great day.Sharon
 
Upvote 0
Thank you so much making those 2 changes worked!!!! I went back and rewatched the video and it was for an and statement not an Or statement.. Thank you so much for helping me out and helping me learn more.

Sharon
 
Upvote 0

Forum statistics

Threads
1,224,743
Messages
6,180,688
Members
452,994
Latest member
Janick

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