Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
LJ LJ is offline
external usenet poster
 
Posts: 16
Default linking the selection of a drop-down list to a quanity in another

I have a drop-down list of about 20 items and would like to then put a $
amount tied to what is selected from the drop-down list into another cell.
ex. if the dropdown list is purple, blue, black, yellow and white I would
like to easily formulate or "tie too" that color a dollar amount. If purple
is selected from the drop-down located in cell B3, then put $2.50 in cell C3
as a cost. I know that i can use an IF, THEN formula but the drop-down list
is very long and the formula would be very long. Is there an easier way to
do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default linking the selection of a drop-down list to a quanity in another

You could use a select case construct within a worksheets Selection_Change
event handler.

You might want to record some macros choosing colors from the microsoft
palette to establish what the color index numbers are but for the illustation
below I have used the color name rather than index

Dim Color

Color = ActiveCell.Interior.ColorIndex

Select Case Color

Case Purple, Green, Blue

Activecell.Offset(1,0).Value = 2.50

Case Yellow

Activecell.Offset(1,0).Value = 5.00

Case Red

ActiveCell.Offset(1,0).Value = 10.00

Case Else

ActiveCell.Offset(1,0).Value = 20.00

End Select

Hope this helps

--
BerbatovIsGod


"LJ" wrote:

I have a drop-down list of about 20 items and would like to then put a $
amount tied to what is selected from the drop-down list into another cell.
ex. if the dropdown list is purple, blue, black, yellow and white I would
like to easily formulate or "tie too" that color a dollar amount. If purple
is selected from the drop-down located in cell B3, then put $2.50 in cell C3
as a cost. I know that i can use an IF, THEN formula but the drop-down list
is very long and the formula would be very long. Is there an easier way to
do this?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default linking the selection of a drop-down list to a quanity in another

Why wouldn't you just have a list with the price for each value listed to
the right of each value, then use a vlookup to find the value selected in
the drop down?

Rgew2004



"PaxtonRoadEnd" wrote in message
...
You could use a select case construct within a worksheets Selection_Change
event handler.

You might want to record some macros choosing colors from the microsoft
palette to establish what the color index numbers are but for the
illustation
below I have used the color name rather than index

Dim Color

Color = ActiveCell.Interior.ColorIndex

Select Case Color

Case Purple, Green, Blue

Activecell.Offset(1,0).Value = 2.50

Case Yellow

Activecell.Offset(1,0).Value = 5.00

Case Red

ActiveCell.Offset(1,0).Value = 10.00

Case Else

ActiveCell.Offset(1,0).Value = 20.00

End Select

Hope this helps

--
BerbatovIsGod


"LJ" wrote:

I have a drop-down list of about 20 items and would like to then put a $
amount tied to what is selected from the drop-down list into another
cell.
ex. if the dropdown list is purple, blue, black, yellow and white I
would
like to easily formulate or "tie too" that color a dollar amount. If
purple
is selected from the drop-down located in cell B3, then put $2.50 in cell
C3
as a cost. I know that i can use an IF, THEN formula but the drop-down
list
is very long and the formula would be very long. Is there an easier way
to
do this?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limiting selection in a cell AND linking that selection to a list Lisa Excel Discussion (Misc queries) 1 July 28th 09 05:00 PM
Help with drop down list selection Mekinnik Excel Programming 2 October 5th 07 04:59 AM
Linking a selection in a drop down list to a calc in another cell hyweledwards Excel Worksheet Functions 6 July 4th 07 04:50 PM
Create a drop down list dependent on selection from another list rosiep Excel Programming 2 March 30th 07 08:22 PM
Help with drop down selection list box joecrabtree Excel Programming 1 December 9th 06 03:11 PM


All times are GMT +1. The time now is 05:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"