How to select a listed item?

E

Eric

There is a list of items in cell A1, such as
A and B
I would like to create a macro shortcut to change the value of cell A1, such
as
if I click Ctrl+Shift+A, then A will be selected in cell A1,
if I click Ctrl+Shift+B, then B will be selected in cell A1,

Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric
 
R

Ron Coderre

Since you're planning on using keystrokes anyway....
How about this:

With A1 selected

[Alt]+down_arrow........displays the dropdown list
Use arrow keys to select an item....Press [Enter]

Is that something you can work with?
***********
Regards,
Ron

XL2003, WinXP
 
E

Eric

Maybe I use macro to type A or B instead of selecting from a list.
Thank eveyone for any suggestion
Eric

Ron Coderre said:
Since you're planning on using keystrokes anyway....
How about this:

With A1 selected

[Alt]+down_arrow........displays the dropdown list
Use arrow keys to select an item....Press [Enter]

Is that something you can work with?
***********
Regards,
Ron

XL2003, WinXP


Eric said:
There is a list of items in cell A1, such as
A and B
I would like to create a macro shortcut to change the value of cell A1, such
as
if I click Ctrl+Shift+A, then A will be selected in cell A1,
if I click Ctrl+Shift+B, then B will be selected in cell A1,

Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric
 
R

Ron Coderre

OK....Try this

Copy the below code and paste it into a General Module of the Visual Basic
Editor

Sub A_in_A1()
[A1].Value = "A"
End Sub
Sub B_in_A1()
[A1].Value = "B"
End Sub

Then....Switch to Excel
[Alt]+[F8]..........shortcut to view the list of available macros

Select: A_in_A1
Click the [Options] button......set the shortcut to Ctrl+Shift+A....Click [OK]

Select: B_in_A1
Click the [Options] button......set the shortcut to Ctrl+Shift+B....Click [OK]
Click [Cancel].....to close the macro list

Does that help?
***********
Regards,
Ron

XL2003, WinXP


Eric said:
Maybe I use macro to type A or B instead of selecting from a list.
Thank eveyone for any suggestion
Eric

Ron Coderre said:
Since you're planning on using keystrokes anyway....
How about this:

With A1 selected

[Alt]+down_arrow........displays the dropdown list
Use arrow keys to select an item....Press [Enter]

Is that something you can work with?
***********
Regards,
Ron

XL2003, WinXP


Eric said:
There is a list of items in cell A1, such as
A and B
I would like to create a macro shortcut to change the value of cell A1, such
as
if I click Ctrl+Shift+A, then A will be selected in cell A1,
if I click Ctrl+Shift+B, then B will be selected in cell A1,

Does anyone have any suggestions on how to do it?
Thanks in advance for any suggestions
Eric
 
Top