Question

Locked

Excel Lookup

By cr8success ·
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!

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

use VLOOKUP

by LocoLobo In reply to Excel Lookup

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.

Back to Software Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums