How to select a listed item?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
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
 

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

Back
Top