Share via

How do you easily type a macron in excel?

Anonymous
2012-03-04T23:58:45+00:00

In Word, I hit "Symbol" then assigned a shortcut key to the ones I wanted.  Excel doe not allow you to assign a shortcut to the symbol.  Why not?  And what's the alternative?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2012-03-12T05:50:57+00:00

Hi,

For example, we want to assign a shortcut key (Ctrl+B) to the symbol "@" in Excel.

Step 1:

Press Alt+F11 >> Insert >> Module, then paste the following code in the added module.

'#################################

'Callback subroutine when using Ctrl+D.

'#################################

Sub Test()

    Application.SendKeys "@"

End Sub

'#############################################

'Register a shortcut key (Ctrl+D) to run the macro Test.

'#############################################

Sub RegisterShortcutKey2Macro()

    Application.MacroOptions Macro:="Test", ShortcutKey:="b"

End Sub

Step 2:

Run the macro RegisterShortcutKey2Macro first, and then go back to Sheet1, try to press the registered shortcut key (Ctrl+B), the symbol "@" will show in the active cell.

Cheers,

Cristin

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2014-08-01T19:12:21+00:00

    Let me add that Cristin's syntax doesn't work either.  The suggested solution ignores the real problem and doesn't even pass a syntax check.  So, to the question, "How do you easily type a Macron in Excel", the answer is "there is no way to easily type and Macron in Excel, and the Help from the Forum Moderator is no help at all.  You guys need to do better, both in terms of software (user-definable shortcut keys should not be rocket science!) and support.  I would grade this effort as "F".

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2017-06-22T18:13:42+00:00

    I am thoroughly confused.

    I am wanting to type a small o with - above it.

    What are the SendKeys?

    How would I enter     ō | latin small letter o with macron (U+014D)?

    I have never attempted this before so I need detailed instructions.

    I can copy ō, but I would like to be able to use it easier.

    Was this answer helpful?

    0 comments No comments
  3. Paul Edstein 82,861 Reputation points Volunteer Moderator
    2014-08-02T01:26:55+00:00

    Yes, SendKeys can be used to insert a Unicode value. For example:

    Sub Demo()

    SendKeys ChrW(&H12B)

    End Sub

    for ī.

    As for Cristin's solution, it works, but you can't use it while the formula bar is active, meaning it's only useful for replacing a cell's contents.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-08-01T18:29:47+00:00

    Cristin's solution doesn't work (but correct me if I'm wrong).  I don't see a way to insert a character with a macron into the macro module.  The Insert Symbol in the worksheet doesn't work, and copy/paste doesn't work.  Is there a way to do a SendKeys using the Unicode value?  Maybe that could work.

    Was this answer helpful?

    0 comments No comments