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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VLookup 1

Status
Not open for further replies.

Cloonalt

Programmer
Jan 4, 2003
354
US
I'm new to this and am struggling with a VLookup. If I could get throught just one, I'd be okay.

I have two columns in sheet1 - Name and Status. I want to have a second sheet with a list of unique Name and Status. And then have sheet1 refer to sheet1 for the status.

Can anyone help?

Thanks
 
forum68 (Microsoft Office) is probably the place for this but
Code:
=IF(C6<>"",VLOOKUP(C6,Lookups!A$1:B$68,2),"")
Says

If cell C6 is not empty then look up its value in the range A$1:B$68 in sheet "Lookups" and return the corresponding value in the second (2) column

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Hate to ask dumb questions, but is C6 the name or status in my case?

Thanks for your help.
 
The name. The status is what you want to return.

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Still can't get it.

In Sheet 1 the Name field is in Column C (there's a header and the data starts in row 2). There are 1800 rows.

In Sheet 2, the Name field is in Column 1 and Status is in Column 2 (there's a header and the data starts in row 2. There are 34 rows in Sheet 2.

Name in sheet 1 is one-to-many with name in sheet 2.

Thanks.
 
Then in Cell D2 on Sheet1 you would need
Code:
=IF(C2<>"",VLOOKUP(C2,Sheet2!A$1:B$34,2),"")

Assuming that Sheet2 data starts on the first row.

The status will appear in column D on Sheet1 when you enter a value in the "C" column on the same row.

Copy and Paste that formula into the cells D3:D1800 on Sheet1. Excel will Change the reference "C2" to "Cn" where "n" is the row number in Sheet1.

Note that the values in Sheet2 MUST be sorted in ascending order by Column A.

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top