Cannot figure out what I am doing wrong

BokiB

New Member
Joined
Jul 19, 2010
Messages
40
Hey,

I have this formula and I cannot figure out what I am doing wrong:

=IF(AND(E3="Australia";I3="Canada");'Exchange rates'!E2); IF(AND(E3="Australia";I3="New Caledonia");'Exchange rates'!M2))

Am I missing a bracket somewhere, or something else I am doing wrong?

Thanks for your help!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try

=IF(AND(E3="Australia";I3="Canada");'Exchange rates'!E2;IF(AND(E3="Australia";I3="New Caledonia");'Exchange rates'!M2,""))
 
Upvote 0
Try this instead:

=IF(AND(E3="Australia",I3="Canada"),'Exchange rates'!E2, IF(AND(E3="Australia",I3="New Caledonia"),'Exchange rates'!M2))

changes are: semi-colons to commas and dropped the ) before the 2nd IF .... I dont' know if thats what you need but it is accepted by Excel now
 
Upvote 0
I think it's the way you may be nesting your IF's. Are semi-colons valid?

Try:

=IF(AND(E3="Australia",I3="Canada"),'Exchange rates'!E2,IF(AND(E3="Australia",I3="New Caledonia"),'Exchange rates'!M2,""))
 
Upvote 0
I think it's the way you may be nesting your IF's. Are semi-colons valid?

Try:

=IF(AND(E3="Australia",I3="Canada"),'Exchange rates'!E2,IF(AND(E3="Australia",I3="New Caledonia"),'Exchange rates'!M2,""))

Yes - in continental versions.
 
Upvote 0
Try me offering.

What does this exactly mean?

And I don't think it's because of the semicolons, because I have another formula which works just fine:

=IF(E3="Australia";LOOKUP(G10;'Ranges Australia'!B2:B25;'Ranges Australia'!D2:D25);IF(E3="Austria";LOOKUP(G10;'Ranges Austria'!B2:B25;'Ranges Austria'!D2:D25);IF(E3="China";LOOKUP(G10;'Ranges China'!B2:B25;'Ranges China'!D2:D25);IF(E3="France";LOOKUP(G10;'Ranges France'!B2:B25;'Ranges France'!D2:D25);etc etc etc
 
Upvote 0
I mean try the solution that I offered earlier.

It is definitely not the semi-colons, and I didn't replace them in my solution.
 
Upvote 0
xld, it works fine now, thanks!

Do you know what the maximum nr of IF statements in a formula is?

I would like to expand this formula to 33 combinations (33 IF statements)
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,972
Members
448,537
Latest member
Et_Cetera

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