ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to select a listed item? (https://www.excelbanter.com/excel-worksheet-functions/153740-how-select-listed-item.html)

Eric

How to select a listed item?
 
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


Ron Coderre

How to select a listed item?
 
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" wrote:

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


Eric

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

"Ron Coderre" wrote:

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" wrote:

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


Ron Coderre

How to select a listed item?
 
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" wrote:

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

"Ron Coderre" wrote:

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" wrote:

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



All times are GMT +1. The time now is 04:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com