Create Short cut key with the help of a macro

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello

I assume a short cut key is created with the help of a macro in excel. I require to build a macro with lots of formulas. If I press one or more clicks on the keyboard, it displays the required data. I wanted some idea as how to create one with short cut keys. Say if I type CTRL + R+S then it should display my name Rajesh Shah. If you can share me with one macro with me or any references to learn how to create one, then, I will get an idea and try to create a macro as per my requirement.
PS. I would like to save the macro in all my workbooks by default.
 
Last edited:

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Go to your macro list and select options to create a macro short cut key

1615124300101.png


You have a Personal Macro Workbook, you first activate the workbook by recording a macro and storing it in there.

1615124461580.png


Once in the Personal Macro Workbook you can access the macro from other workbooks
 
Upvote 0
Go to your macro list and select options to create a macro short cut key

View attachment 33719

You have a Personal Macro Workbook, you first activate the workbook by recording a macro and storing it in there.

View attachment 33720

Once in the Personal Macro Workbook you can access the macro from other workbooks
I was able to create one and have saved the sheet as Excel micro enabled workbook. But when I run the macro it runs in the same cell. I want it to run in the active cell. (whereever the cursor is).
Sub Name()
'
' Name Macro
' Display Rajesh Shah
'
' Keyboard Shortcut: Ctrl+r
'
ActiveWindow.SmallScroll Down:=6
Range("E24").Select
ActiveCell.FormulaR1C1 = "Rajesh Shah"
Range("E25").Select
End Sub
 
Upvote 0
ActiveCell.FormulaR1C1 = "rajesh shah"
Just one line of code. It worked
Thanks davesexcel.
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top