array formula using 2 criteria

nisselyo

Board Regular
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

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

MrExcel MVP
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)))

thanks.

nisselyo

Board Regular
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

MrExcel MVP
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))))

Replies
0
Views
58
Replies
3
Views
113
Replies
0
Views
242
Replies
1
Views
564
Replies
0
Views
65

1,127,395
Messages
5,624,487
Members
416,031
Latest member
Omega67

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?

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

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