Question Locked

Excel Lookup

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need to find the STATE that any area code belongs to.
I have 2 Worksheets
1 - Area Code = Column 1, State = Column 2
2 - Phone Numbers - =left(B1,3) to get the area code.
I want to find the STATE that belongs the Trimmed number.

Thanks!

2 replies

by locolobo

Assumptions:
both worksheets are in the same spreadsheet
worksheets are named State and Phone

State: Column A contains the area code, Column B contains the State, for this to work I had to convert the area codes in column A to text. It didn't work before that.

Phone: the formula "=left(B1,3)" is in cell D1

My formula was =VLOOKUP(D1,State!A2:B51,2)

If it gives you trouble keep playing with the parameters. The value you are comparing to has to be the same data type as is in the table. You can fake that by inserting a column to convert the area codes to text.

This discussion is closed to new replies.