how to show data in another cell from a drop down box

S

shaky_uk

I have created a drop down box from another worksheet. What i want to happen
is when the data from the list is selected excel then pastes data into
another cell.
In the drop down list is a list of descriptions when one of these is
selected i want to link to the corresponding price and paste it to a cell.
for invoicing purposes is this possible?
 
G

Gary''s Student

Once you have used the Data Validation drop-down to select an item from the
list, use the =VLOOKUP() function to get the price from an adjacent column.
 
S

Shane Devenshire

Hi,

If all you want is the value to appear in the cell, use a VLOOKUP or related
formula as suggested. If you actually want to paste a value into a cell, and
not use a formula then you would need to code it with VBA.


Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1"))
If Not isect Is Nothing Then
'your code here
End If
End Sub

In this example the drop down list would be in cell A1 of the active sheet.
You would need to put code into the "your code here" part to do whatever you
want.

If this helps, please click the Yes button.
 

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