Background

In Excel 2010, for some ridiculous reason, there is no built-in hotkey (or even a button on the toolbar) for subscripting/superscripting text within a text cell.

You can, however, highlight the text, right-click the selection, click format, and then check the [x] subscript or [x] superscript checkbox.

Question

Are there any kinds of excel macros or workarounds to map two keyboard hotkeys to the subscript and superscript keys, respectively?

(It should only be, like, two lines of code - one for the event handler and one for the actual procedure call... I would write one myself but my VBA is rusty, at best, and I am pretty confident there is probably already some kind of solution, despite my inability to find one via search engine)

Thanks for any help you can provide!

link|improve this question
MS Word actually has a shortcut key for it... I don't know why they didn't think it would be useful in Excel. (in which people FREQUENTLY use subscripts/superscripts for variable names, etc.) – advs89 Apr 7 '11 at 0:21
feedback

2 Answers

You can't run a macro while on the "Cell Edit Mode" (cfr. http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/3333e18b-cef3-4d78-b47a-6916a1b2d84c/). Also, there are no ribbon buttons to do something like that. Your only chance seems to be this utility: http://www.panuworld.net/utils/excel/.

link|improve this answer
feedback

Assuming you want to highlight the text within the cell, and not just the selected text, create a macro with whatever hotkey you want and the following VBA:

ActiveCell.Font.Superscript = True
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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