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!
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

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

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,010
Messages
5,508,773
Members
408,692
Latest member
OptimalKR

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top