Finding all elements in a database

L

Lady Success

I have a worksheet where the user enters a state abbreviation in B1 (i.e. UT)
in a query sheet. I want to find the associated state information located in
another sheet in the same workbook.

The query worksheet would look like this:
A1 B1 C1 D1
List state abbrev ut Available Plan 1 Available Plan 2


The database looks like this:
Abbreviation State_Name Available Plan 1 Available Plan 2
AK ALASKA Choice Value
AL ALABAMA Premier Protect
UT ARKANSAS Choice Value


I want C2 to show "Choice" and D2 to show "Value".

Any help would be appreciated.

Thanks!
 
J

Jacob Skaria

Assuming you have you data in Sheet2; in Sheet1 C1 use the below formula.
Please change the data rows to suit your requirment. I have taken this as 20.

=INDEX(Sheet2!C1:C20,MATCH($B$1,Sheet2!$A$1:$A$20,0))
copy the same to D1

Alternatively you can use VLOOKUP()

Sheet1 C1
=VLOOKUP($B$1,Sheet2!$A$1:$D$25,3,FALSE)

Sheet1 D1
=VLOOKUP($B$1,Sheet2!$A$1:$D$25,4,FALSE)

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top