Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 2 values in 1 cell

Hello All,
I'm trying to make a drop down list with alpha values (A thru Z) so that if
you select "A", it'll show "A" in the cell but give it a value of 1. Thus
if you select "B" in the dropdown, it'll show "B" however give it a value of
2 and so on.
Anyone have a VBA macro or excel equation that would work for this?
Corey


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 2 values in 1 cell

A will have to be A. What you can do is interpret that where you need 1 by
using a formula such as:
=CODE(UPPER(A1))-64
This assumes your list is in cell A1.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Corey Heidenreich" wrote in message
...
Hello All,
I'm trying to make a drop down list with alpha values (A thru Z) so that

if
you select "A", it'll show "A" in the cell but give it a value of 1. Thus
if you select "B" in the dropdown, it'll show "B" however give it a value

of
2 and so on.
Anyone have a VBA macro or excel equation that would work for this?
Corey




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 2 values in 1 cell

Hey Andy,
Okay.........I've got my list in E1 thru E26.
I've named those cells as "Alpha"
In cell 'a1' I've done a 'list' validation equalling "alpha" so the drop
down shows there.
How do I get that validated cell to show the different numeric values (1
thru 26) when the alpha values are selected?

Corey



"Andy Wiggins" wrote in message
...
A will have to be A. What you can do is interpret that where you need 1 by
using a formula such as:
=CODE(UPPER(A1))-64
This assumes your list is in cell A1.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Corey Heidenreich" wrote in message
...
Hello All,
I'm trying to make a drop down list with alpha values (A thru Z) so that

if
you select "A", it'll show "A" in the cell but give it a value of 1.
Thus
if you select "B" in the dropdown, it'll show "B" however give it a value

of
2 and so on.
Anyone have a VBA macro or excel equation that would work for this?
Corey






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 2 values in 1 cell

Cancel that Andy........
I got it! Thanks for your help!
Corey Heidenreich




"Corey Heidenreich" wrote in message
...
Hey Andy,
Okay.........I've got my list in E1 thru E26.
I've named those cells as "Alpha"
In cell 'a1' I've done a 'list' validation equalling "alpha" so the drop
down shows there.
How do I get that validated cell to show the different numeric values (1
thru 26) when the alpha values are selected?

Corey



"Andy Wiggins" wrote in message
...
A will have to be A. What you can do is interpret that where you need 1 by
using a formula such as:
=CODE(UPPER(A1))-64
This assumes your list is in cell A1.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Corey Heidenreich" wrote in message
...
Hello All,
I'm trying to make a drop down list with alpha values (A thru Z) so that

if
you select "A", it'll show "A" in the cell but give it a value of 1.
Thus
if you select "B" in the dropdown, it'll show "B" however give it a
value

of
2 and so on.
Anyone have a VBA macro or excel equation that would work for this?
Corey








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 2 values in 1 cell

Another Quick Question......
What if the alpha values were actually people names, or city names......but
yet you wanted to use the numeric values for those?
How would that work?
Corey




"Andy Wiggins" wrote in message
...
A will have to be A. What you can do is interpret that where you need 1 by
using a formula such as:
=CODE(UPPER(A1))-64
This assumes your list is in cell A1.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Corey Heidenreich" wrote in message
...
Hello All,
I'm trying to make a drop down list with alpha values (A thru Z) so that

if
you select "A", it'll show "A" in the cell but give it a value of 1.
Thus
if you select "B" in the dropdown, it'll show "B" however give it a value

of
2 and so on.
Anyone have a VBA macro or excel equation that would work for this?
Corey








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default 2 values in 1 cell

The Function CODE only deals with the first character in the string. So the
formula "=CODE(UPPER(A1))-64" will still produce a (1) even if cell A1
contains the word "Alphabet". Does this help?

Mike F

"Corey Heidenreich" wrote in message
...
Another Quick Question......
What if the alpha values were actually people names, or city
names......but yet you wanted to use the numeric values for those?
How would that work?
Corey




"Andy Wiggins" wrote in message
...
A will have to be A. What you can do is interpret that where you need 1 by
using a formula such as:
=CODE(UPPER(A1))-64
This assumes your list is in cell A1.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Corey Heidenreich" wrote in message
...
Hello All,
I'm trying to make a drop down list with alpha values (A thru Z) so that

if
you select "A", it'll show "A" in the cell but give it a value of 1.
Thus
if you select "B" in the dropdown, it'll show "B" however give it a
value

of
2 and so on.
Anyone have a VBA macro or excel equation that would work for this?
Corey








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 2 values in 1 cell

If your list is in the range B1:B5 and the dropdown is in cell A1 then use:

=MATCH(A1,B1:B5,0)

You could have used something similar for your original question.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Corey Heidenreich" wrote in message
...
Another Quick Question......
What if the alpha values were actually people names, or city

names......but
yet you wanted to use the numeric values for those?
How would that work?
Corey




"Andy Wiggins" wrote in message
...
A will have to be A. What you can do is interpret that where you need 1

by
using a formula such as:
=CODE(UPPER(A1))-64
This assumes your list is in cell A1.

--
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
-

"Corey Heidenreich" wrote in message
...
Hello All,
I'm trying to make a drop down list with alpha values (A thru Z) so

that
if
you select "A", it'll show "A" in the cell but give it a value of 1.
Thus
if you select "B" in the dropdown, it'll show "B" however give it a

value
of
2 and so on.
Anyone have a VBA macro or excel equation that would work for this?
Corey








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
VLookup multiple values - sum returned values into single cell se7098 Excel Worksheet Functions 12 April 2nd 23 07:32 PM
Copy values from a cell based on values of another cell Spence10169 Excel Discussion (Misc queries) 4 January 13th 09 10:01 AM
How to assign values to a cell based on values in another cell? Joao Lopes Excel Worksheet Functions 1 December 5th 07 09:02 PM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


All times are GMT +1. The time now is 11:25 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"