Multiple if statements -- my conditions are being ignored

PortoMarco

New Member
Joined
Jul 10, 2014
Messages
21
Hi

I have an IF statement that is either not behaving properly or my syntax is wrong.

=LARGE(IF(Return!$C$2:$C$600=$X$3,Return!$P$2:$P$600,IF(Return!$D$2:$D$600=$X$6,Return!$P$2:$P$600)),AA6)

The conditions are:

X3 -- the strategy
X6 -- in or out
AA6 - AA15 - the ranking 1-10

The Return tab:

C = Strategy
D = in/out
P = Data I am calling

So, call the largest value if the strategy in C is the same as the value in X3 & is listed as "in" in X6.

Whenever I input this formula, it doesn't bother filtering the data at all. It just provides me with the top 10 for the whole data set; ignoring both conditions in X3 and X6.

Thanks
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
... or my syntax is wrong.
I think that is the case.

Try this instead. Remember to confirm with Ctrl+Shift+Enter

=LARGE(IF(Return!$C$2:$C$600=$X$3,IF(Return!$D$2:$D$600=$X$6,Return!$P$2:$P$600)),AA6)


If you are using Excel 2010 or later, you could also try this, which doesn't require the CSE entry

=AGGREGATE(14,6,Return!$P$2:$P$600/((Return!$C$2:$C$600=$X$3)*(Return!$D$2:$D$600=$X$6)),AA6)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,226,217
Messages
6,189,687
Members
453,563
Latest member
Aswathimsanil

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