VLOOKUP or ???

imported_unknown

Active Member
Joined
Jan 13, 2002
Messages
424
I need a formula to do the following:

Column A Column B Column C
NAME TEAM # STATE
Fred Team 1 California
Fred Team 2 Louisiana
Wilma Team 1 Colorado
Scooby Team 2 New Jersey

I want to do this:

Column A Column B Column C
(INPUT)Name Team 1(FORMULA)Team 2 (FORMULA)

I tried a "IF" statement with an "AND" statement and a VLOOKUP with the two criteria, but I don't get the correct info.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Have you thought about re-arranging your data table? If each person has a maximum of two (2) teams (i.e. team 1, team 2), could you not set up your table as follows:

Name, Team 1 State, Team 2 State
Fred, California, Louisiana
Wilma, Colorado, blank
Scooby, blank, New Jersey

Now your vlookup would work by using different column numbers as the third argument in the vlookup formula for team 1 & team 2 respectively.
Alternatively, with the same table setup, use autofilters on the list to select the name required, and the matching record, with teams, will be displayed - no formulae required at all!

HTH
BigC
 
Upvote 0

Forum statistics

Threads
1,222,441
Messages
6,166,049
Members
452,009
Latest member
oishi

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