Formula IF(OR

Jon Johny

Board Regular
Joined
Sep 15, 2008
Messages
162
I have a formula construction question. Below is the formula I have. (I am looking up the number of wins a certain team has). The lookup is looking this team up on the 'Team1' range, however, sometimes the team I am looking up may not be in this range and on the 'Team2' range, or in the 'Team3' range. How do I incorporate Team2 and Team3 ranges into this formula??

I think this is IF(OR(

Thank you

=IF(ISERROR(VLOOKUP($A3,Team1,2,FALSE)),"0",VLOOKUP($A3,Team1,2,FALSE))
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Try:

=IF(COUNTIF(Team1,$A3),VLOOKUP($A3,Team1,2,FALSE),IF(COUNTIF(Team2,$A3),VLOOKUP($A3,Team2,2,FALSE),IF(COUNTIF(Team3,$A3),VLOOKUP($A3,Team3,2,FALSE),0)))
 
Upvote 0
Great, thanks. Can you include a modifier, like I had in the above formual that accomodate errors?

Thanks
 
Upvote 0
This is one way:

=IF(ISERROR(VLOOKUP($A3,Team1,2,FALSE)),IF(ISERROR(VLOOKUP($A3,Team2,2,FALSE)),IF(ISERROR(VLOOKUP($A3,Team3,2,FALSE)),0,VLOOKUP($A3,Team3,2,FALSE)),VLOOKUP($A3,Team2,2,FALSE)),VLOOKUP($A3,Team1,2,FALSE))

I hope the parentheses are correct. :)

Hope that helps.
 
Upvote 0
Try

=IF(NOT(ISERROR(VLOOKUP($A3,Team1,2,FALSE))),VLOOKUP($A3,Team1,2,FALSE),
IF(NOT(ISERROR(VLOOKUP($A3,Team2,2,FALSE))),VLOOKUP($A3,Team2,2,FALSE),
IF(NOT(ISERROR(VLOOKUP($A3,Team3,2,FALSE))),VLOOKUP($A3,Team3,2,FALSE),0)))
 
Upvote 0
This formula worked out great...I just need this formula when team 3 is not included. I simply deleted the last condition (team3) but I got an N/A error. Im assuming Im missing some brakcet or other...

How do I do this?


=IF(ISERROR(VLOOKUP($A3,Team1,2,FALSE)),IF(ISERROR(VLOOKUP($A3,Team2,2,FALSE)),IF(ISERROR(VLOOKUP($A3,Team3,2,FALSE)),0, VLOOKUP($A3,Team3,2,FALSE)),VLOOKUP($A3,Team2,2,FALSE)),VLOOKUP($A3,Team1,2,FALSE))
 
Upvote 0
I have a formula construction question. Below is the formula I have. (I am looking up the number of wins a certain team has). The lookup is looking this team up on the 'Team1' range, however, sometimes the team I am looking up may not be in this range and on the 'Team2' range, or in the 'Team3' range. How do I incorporate Team2 and Team3 ranges into this formula??

I think this is IF(OR(

Thank you

=IF(ISERROR(VLOOKUP($A3,Team1,2,FALSE)),"0",VLOOKUP($A3,Team1,2,FALSE))

Also, because you expect a number...
Code:
=LOOKUP(9.99999999999999E+307,CHOOSE({1,2,3,4},
   0,
   VLOOKUP($A3,Team1,2,0),
   VLOOKUP($A3,Team2,2,0),
   VLOOKUP($A3,Team3,2,0)))
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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