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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

xld

Banned
Joined
Feb 8, 2003
Messages
5,378
Try

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

WaterGypsy

Well-known Member
Joined
Jan 15, 2010
Messages
697
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
 

milesUK

Active Member
Joined
Jan 5, 2003
Messages
388
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,""))
 

BokiB

New Member
Joined
Jul 19, 2010
Messages
40

ADVERTISEMENT

Tried that one, but it states that the formula contains an error
 

xld

Banned
Joined
Feb 8, 2003
Messages
5,378
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.
 

BokiB

New Member
Joined
Jul 19, 2010
Messages
40
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
 

xld

Banned
Joined
Feb 8, 2003
Messages
5,378
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.
 

BokiB

New Member
Joined
Jul 19, 2010
Messages
40
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,133,163
Messages
5,657,172
Members
418,363
Latest member
Debating_Earth

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