Lookup, value could be in more than one column

Davg

Board Regular
Joined
Jul 19, 2011
Messages
62
I have the results of a load of basketball games and want to find out what a team's last result was. (I got columns C and D with simple if functions on the results and these columns may be redundant.)

So in E2 I would like to have a lookup function which searches columns A and B for the first occurrence of "Golden State Warriors" and then returns if they won or not. i.e. in this case it will come out as "no"

Many thanks for the help and sorry this is badly explained.

<table width="750" border="0" cellpadding="0" cellspacing="0"><col style="mso-width-source:userset;mso-width-alt:10898; width:224pt" span="2" width="298"> <col style="mso-width-source:userset;mso-width-alt:2816; width:58pt" span="2" width="77"> <tbody><tr style="height:15.0pt" height="20"> <td style="height:15.0pt;width:224pt" height="20" width="298">Home Team</td> <td style="width:224pt" width="298">Away Team</td> <td style="width:58pt" width="77">Home win?</td> <td style="width:58pt" width="77">Away win?</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Golden State Warriors </td> <td> Portland Trailblazers</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Los Angeles Clippers </td> <td> Memphis Grizzlies</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Phoenix Suns </td> <td> San Antonio Spurs</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Charlotte Bobcats </td> <td> Atlanta Hawks</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Chicago Bulls </td> <td> New Jersey Nets</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Cleveland Cavaliers </td> <td> Washington Wizards</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Dallas Mavericks </td> <td> New Orleans Hornets</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Philadelphia 76ers </td> <td> Detroit Pistons</td> <td>No</td> <td>Yes</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Toronto Raptors </td> <td> Miami Heat</td> <td>No</td> <td>Yes</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Utah Jazz </td> <td> Denver Nuggets</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Los Angeles Lakers </td> <td> San Antonio Spurs</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Portland Trailblazers </td> <td> Memphis Grizzlies</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">New York Knicks </td> <td> Chicago Bulls</td> <td>No</td> <td>Yes</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Sacramento Kings </td> <td> Oklahoma City Thunder</td> <td>No</td> <td>Yes</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Denver Nuggets </td> <td> Golden State Warriors</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Houston Rockets </td> <td> Dallas Mavericks</td> <td>No</td> <td>Yes</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Milwaukee Bucks </td> <td> Toronto Raptors</td> <td>Yes</td> <td>No</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">New Orleans Hornets </td> <td> Utah Jazz</td> <td>No</td> <td>Yes</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Detroit Pistons </td> <td> Cleveland Cavaliers</td> <td>No</td> <td>Yes</td> </tr> <tr style="height:15.0pt" height="20"> <td style="height:15.0pt" height="20">Atlanta Hawks </td> <td> Miami Heat</td> <td>No</td> <td>Yes</td> </tr> </tbody></table>
 
That was the reason for the using of 0000 instead of 00. I saw no reason to spare 0 (zeros), but you are right in the sense that the formula with less zeros is clearer and easier to understand.

It was a good shout, Marcelo. And it seems that INDIRECT understands the address regardless of how many 0s are used.

Thanks for sharing this.

Matty
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,224,503
Messages
6,179,136
Members
452,890
Latest member
Nikhil Ramesh

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