Assigning numerical value to text

G

Guest

This may be simple but I'm new...forgive me...
I've created drop-down lists in a column with several variables all in text
from a list. I am trying to make it so that when I click on a variable, the
numerical value is displayed in the cell....
Any help would be appreciated.....maybe I'm looking in the wrong spot but I
couldn't find it under all the "Help" topics....

Thanks,
Dave
 
T

T. Valko

How many variables are there? If it's more than 4-5 and there's no
sequential pattern to the logic then your best bet is to create a lookup
table. For example:

...........A..........B
1.......Red.......10
2.......Blue.......25
3.......Green....37

Your drop down list is in cell D1 and the selections are Red, Blue or Green.
Then in say, cell E1 you'd use this formula:

=VLOOKUP(D1,A1:B3,2,0)

Biff
 
G

Guest

There may be as many at 10 numerical variables and they will just be
sequential from 1 to 10. The drop down list may contain as many as 5 words.
Just to start, as a test, I've created just three text entries in the drop
down list and wish to assign them simply the numbers 1 to 3. I've created
two reference columns one containing the text and the next containing the
numbers 1 to three corresponding to the text.....The drop down menu's will
extend the entire length of the column...in this case column B....
 
G

Guest

Hi, Dave

This is completely off topic and has nothing to do with your post, but in
case you're interested I've found the solution to the "No focus rectangles
when using XP styles on VB6 project" problem you posted somewhere last year.
Hit the same brick wall this morning and have finally figured out the answer.

Cheers and good luck with the Excel post!

Mark
 
T

T. Valko

Ok, does that work like you want it to?

Biff

Dave said:
There may be as many at 10 numerical variables and they will just be
sequential from 1 to 10. The drop down list may contain as many as 5
words.
Just to start, as a test, I've created just three text entries in the drop
down list and wish to assign them simply the numbers 1 to 3. I've created
two reference columns one containing the text and the next containing the
numbers 1 to three corresponding to the text.....The drop down menu's will
extend the entire length of the column...in this case column B....
 
G

Guest

to some extent although is it possible to have the numerical value returned
in the same cell as the drop down menu..???

Thanks for the help so far!!!
Dave
 
T

T. Valko

is it possible to have the numerical value returned
in the same cell as the drop down menu..???

Not using worksheet formulas. It can probably be done with some VBA code but
I don't know how to do it.

Biff
 
G

Guest

Ok, thanks again for the help...I think we can still work it with what you've
given us....appreciate it...

Dave
 
G

Guest

Sorry, if I could bug you one more time........when you cut and paste a
formula into a cluster of cells within a column (using the VLookup format)
how do you keep the reference array the same.....everytime I cut and paste
the reference cell numbers also change???
thx..

Dave
 

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