array formula using 2 criteria

nisselyo

Board Regular
Joined
Jun 20, 2007
Messages
61
My formula works when I use only one criteria but when I include an and with a second criteria it doesnt work - any idea why?

This one works:
=MIN(IF('Citi - Sheet1'!$C$2:$C$10091=B107,'Citi - Sheet1'!$E$2:$E$10091))
and this one works
=MIN(IF('Citi - Sheet1'!$D$2:$D$10091=45,'Citi - Sheet1'!$E$2:$E$10091))

but when I combine these 2 criteria I get 0 - which is incorrect
=MIN(IF(AND('Citi - Sheet1'!$C$2:$C$10091=B107,'Citi - Sheet1'!$D$2:$D$10091=45),'Citi - Sheet1'!$E$2:$E$10091))

Thanks,
Yosef
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
My formula works when I use only one criteria but when I include an and with a second criteria it doesnt work - any idea why?

This one works:
=MIN(IF('Citi - Sheet1'!$C$2:$C$10091=B107,'Citi - Sheet1'!$E$2:$E$10091))
and this one works
=MIN(IF('Citi - Sheet1'!$D$2:$D$10091=45,'Citi - Sheet1'!$E$2:$E$10091))

but when I combine these 2 criteria I get 0 - which is incorrect
=MIN(IF(AND('Citi - Sheet1'!$C$2:$C$10091=B107,'Citi - Sheet1'!$D$2:$D$10091=45),'Citi - Sheet1'!$E$2:$E$10091))

Thanks,
Yosef

Control+shift+enter...

=MIN(IF('Citi - Sheet1'!$C$2:$C$10091=B107,IF('Citi - Sheet1'!$D$2:$D$10091=45,'Citi - Sheet1'!$E$2:$E$10091)))
 

nisselyo

Board Regular
Joined
Jun 20, 2007
Messages
61
It worked like a charm - thanks. One follow up question
Im looking up the lowest rate with tose variables. my next issue is that some of the rates have a cost (which is the net column over) of #n/a. Is there a way to find the minimum with these criteria - but fotr where the cost is a number and not this error?
Thanks,
Yosef
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
It worked like a charm - thanks. One follow up question
Im looking up the lowest rate with tose variables. my next issue is that some of the rates have a cost (which is the net column over) of #n/a. Is there a way to find the minimum with these criteria - but fotr where the cost is a number and not this error?
Thanks,
Yosef

Assuming that 'Citi - Sheet1'!$E$2:$E$10091 might contain #N/A...

Control+shift+enter:

=MIN(IF('Citi - Sheet1'!$C$2:$C$10091=B107,IF('Citi - Sheet1'!$D$2:$D$10091=45,IF(ISNUMBER('Citi - Sheet1'!$E$2:$E$10091),'Citi - Sheet1'!$E$2:$E$10091))))
 

Watch MrExcel Video

Forum statistics

Threads
1,123,511
Messages
5,602,079
Members
414,500
Latest member
kevdragon1

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