Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Selecting an adjacent column based on value of previous column 1

Status
Not open for further replies.

aalnaif

Technical User
Jan 12, 2007
44
CA
Hi,
I know the title is confusing, but I have a column in which all rows are zero except one, which is equal to "1". I would like a formula to set a cell equal to the next column in that row (which is equal to 1).

For example, take the following data (seperated into two columns):

0 | Bob
0 | Joe
0 | Sarah
1 | Jen
0 | Dave

Notice that only 1 row is equal to "1". Now, I would like to have a formula which would allow me to set a cell equal to "Jen".

Thanks.
 
Something like...
Code:
=VLOOKUP(1,A1:B5,2,9)

The table in the above formula is 'A1:B5' based on the example you provided with 5 rows of data. You will want to select your entire table when entering this formula.

Hope this helps,
Matt
 
Thanks Matt, That's exactly what I was looking for!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top