ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Finding all elements in a database (https://www.excelbanter.com/excel-discussion-misc-queries/230065-finding-all-elements-database.html)

Lady Success

Finding all elements in a database
 
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!




--
Lady

Jacob Skaria

Finding all elements in a database
 
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
---------------
Jacob Skaria


"Lady Success" wrote:

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!




--
Lady



All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com