Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I create a custom shortcut like Ctrl+D to do certain task in excel 2010 using VBA? Also I'd like to use this shortcut again and again for different files.

However, I used VBA before for very simple repetitive tasks such as copying certain range of cells and inserting them into among cells in another sheet, and repeating this procedure for next 10 cells, or creating graphs using certain range of cells and repeating that procedure for next range of cells etc.

share|improve this question

2 Answers 2

It is called a macro. When you create a macro, you can assign it a key binding. Make sure to save it someone other than the file that you are using if you want to use it in other files easily (otherwise you will have to navigate to the file that has the macro that you are looking for).

share|improve this answer

Once you've created a macro (via recording it or creating it in the VBA editor), you can assign it a shortcut key as soandros has mentioned.

This is in Excel 2007, but I'm sure the layout is still similar:

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.