Macro to change part of cell

A

Amy

Hi,
I often need to change the formatting of only part of a cell - e.g. for the
units ug s-1, where the -1 is superscript and the u is actually the Greek
letter mu (m in Symbol font). I know how to do both these things via the
"format cells" dialog box, but would like a keyboard shortcut to do them
quickly. I tried to record a macro to change to superscript and another to
change to Symbol font, but these change the formatting of the whole cell.
When I select just the characters whose format I want to change, the 'macros'
option is greyed out.

How can I run a macro on only part of a cell, or else is there another way
to achieve this with a keyboard shortcut? Ideally I would like to apply this
to chart titles as well.

I'm using Excel 2003.

Thanks,
Amy
 
P

Pierre

Amy,

Have you tried using "find and replace" and including the formatting options?

It will check in every cell and/or formula and if you use "replace" you can
control which you modify one by one... but "replace all" will make all your
changes pretty quickly... granted, of course, you have many of the same
changes to make.

Hope it helps...
 
D

Dave Peterson

Yep. But your macro could go through each cell looking for the characters to
make superscript. Essentially, it would be doing the character by character
formatting that you can do manually.

If you only have a few cells (or the set of characters is really variable), you
may want to try John Walkenbach's addin:
http://j-walk.com/ss/excel/files/supersub.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top