ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   making a drop-down list with two separate columns (https://www.excelbanter.com/excel-discussion-misc-queries/216384-making-drop-down-list-two-separate-columns.html)

KeithAnuskewicz

making a drop-down list with two separate columns
 
I have made a drop-down list of different items (text). I want to have each
item's respective price (currency) populate the adjacent column after that
item is picked from the list.

I first tried imbedded conditional "if" statements where if the text chosen
on the list was equal to the text in a particular cell, the contents of
another cell (the price) would be displayed. This worked well for me until I
got past 7 imbedded "if" statements for the particular cell; then I would get
an error.

Since I need to do this for more items, I tried to make a drop-down list
from the two columns (item description and price), but found out you can only
make a list from a single column or row.

Any suggestions?

Thanks,
Keith

Gord Dibben

making a drop-down list with two separate columns
 
Dropdown list in A1 of sheet1

On sheet2 column A your items

Column B your price for each item

In sheet1 B1 enter =VLOOKUP(A1,Sheet2!A:B,2,FALSE)



Gord Dibben MS Excel MVP

On Tue, 13 Jan 2009 13:47:01 -0800, KeithAnuskewicz
wrote:

I have made a drop-down list of different items (text). I want to have each
item's respective price (currency) populate the adjacent column after that
item is picked from the list.

I first tried imbedded conditional "if" statements where if the text chosen
on the list was equal to the text in a particular cell, the contents of
another cell (the price) would be displayed. This worked well for me until I
got past 7 imbedded "if" statements for the particular cell; then I would get
an error.

Since I need to do this for more items, I tried to make a drop-down list
from the two columns (item description and price), but found out you can only
make a list from a single column or row.

Any suggestions?

Thanks,
Keith



Max

making a drop-down list with two separate columns
 
You could use a vlookup to simplify things ..

Assume the ref table is set up in A1:B1 down in Sheet2
(eg: Item-Price)

Then in Sheet1,
Assume droplists (to select values in Sheet2's col A) are in A2 down
Put in B2, copied down:
=IF(A2="","",VLOOKUP(A2,Sheet2!A:B,2,0))
Col B will return the required matching values from Sheet2's col B
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"KeithAnuskewicz" wrote:
I have made a drop-down list of different items (text). I want to have each
item's respective price (currency) populate the adjacent column after that
item is picked from the list.

I first tried imbedded conditional "if" statements where if the text chosen
on the list was equal to the text in a particular cell, the contents of
another cell (the price) would be displayed. This worked well for me until I
got past 7 imbedded "if" statements for the particular cell; then I would get
an error.

Since I need to do this for more items, I tried to make a drop-down list
from the two columns (item description and price), but found out you can only
make a list from a single column or row.

Any suggestions?

Thanks,
Keith



All times are GMT +1. The time now is 12:34 PM.

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