View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
scottfoxall scottfoxall is offline
external usenet poster
 
Posts: 40
Default Help...Using dropdown list

Sorry

Missed this script under Count=1

Search="ON"

And Count=1 should be Count=0

So it looks like this, and it works!

'--------------------------------------------------------------------
Private Sub ComboBox1_Change()

Project = ComboBox1.Value
Count = 0
Search = "ON"

While Search = "ON"
If Project = Range("A1").Offset(Count, 0).Value Then
Range("B5").Value = Count
Search = "OFF"
Else
If Project = "" Then
Search = "OFF"
End If
Count = Count + 1
End If
Wend

End Sub
'------------------------------------------------------------


"modicon2" wrote:


Greetings,
I need to select an item from a dropdown list but display a different
name/number.
For example:
My dropdown list contains the following items:
Project in town
Project out of town
Project on the road
Projeect anywhere

I want to select the dropdown list and see the items listed above but
when I select an item, I want just a number to showup in the cell.

exm1: If I selected "Project in town" from dropdown, then a "1" would
be displayed in the cell.

exm2: If I selected "Project out of town" from dropdown, then a "2"
would be displayed in the cell.

I can make a list and set the dropdown to display that list by using
Data..Validation..allow:list...then select data range.

Thanks!


--
modicon2
------------------------------------------------------------------------
modicon2's Profile: http://www.excelforum.com/member.php...fo&userid=4158
View this thread: http://www.excelforum.com/showthread...hreadid=573943