Excel 2010 - macro to change font of selected words
Thread poster: Susan Welsh
Susan Welsh
Susan Welsh  Identity Verified
United States
Local time: 06:02
Russian to English
+ ...
May 23, 2012

Is it possible to write a macro to change the font of only selected words in an Excel cell?

I have a client that wants checking of a translation, with source text in one Excel column and target text in the second column. Every cell that has something in it that is changed has to be highlighted in yellow and the word or words that are changed by the editor (me) have to be changed to red font.

This is very tedious, and it took me 1.5 hours to review some 700 words of very
... See more
Is it possible to write a macro to change the font of only selected words in an Excel cell?

I have a client that wants checking of a translation, with source text in one Excel column and target text in the second column. Every cell that has something in it that is changed has to be highlighted in yellow and the word or words that are changed by the editor (me) have to be changed to red font.

This is very tedious, and it took me 1.5 hours to review some 700 words of very easy text, mainly because of all the mousing about. I have studied up on macros, and managed to create macros for the yellow highlighting (on and off), and to change the black font to red and back to black again in the WHOLE cell. But I don't want the whole cell, only the selected words.

Any suggestions?
Collapse


 
Tony M
Tony M
France
Local time: 12:02
Member
French to English
+ ...
SITE LOCALIZER
Styles... May 23, 2012

I'm not familiar with Excel 2007, nor in particular with using styles in Excel; but can't you simply defined a 'changed word' style, and assign it to a specific keyboard short cut? That ought to do the trick, without need to actually write a custom macro.

However, I have to emphasize that I've never actually tried it!

Alternatively, copy the text out to Word, do the manipulation there, and then copy it back across; the cell b/g colour will still have to be done manually
... See more
I'm not familiar with Excel 2007, nor in particular with using styles in Excel; but can't you simply defined a 'changed word' style, and assign it to a specific keyboard short cut? That ought to do the trick, without need to actually write a custom macro.

However, I have to emphasize that I've never actually tried it!

Alternatively, copy the text out to Word, do the manipulation there, and then copy it back across; the cell b/g colour will still have to be done manually, but the other text formatting should be easier to achieve in Word, and should be preserved when you copy back. If you were lucky, you might even be able to find a way to do it using 'Track changes' — for example, do a search-&-replace-all on the 'added text' style in T/c, replacing it with say the colour or other font style you want; then 'accept all changes in document'. You'll have to see if something like that is feasible, but it might be the quickest way.

Then copy it all back to Excel at the end, of course!

Warning! Will cause havoc if there are merged cells or manual line breaks within Excel cells!

[Edited at 2012-05-23 12:56 GMT]
Collapse


 
Susan Welsh
Susan Welsh  Identity Verified
United States
Local time: 06:02
Russian to English
+ ...
TOPIC STARTER
update May 24, 2012

Thanks for your reply, Tony.
Apparently there is no way to assign a keyboard shortcut in Excel--that's what an expert friend told me, and I certainly don't know how to do it.
The method of moving the whole thing to MS Word works (my friend gave me step-by-step instructions, involving Styles), but as you point out, there are dangers lurking there. He said he tried the "track changes" route and it did not succeed.

But the good news is, I complained so loudly about this to
... See more
Thanks for your reply, Tony.
Apparently there is no way to assign a keyboard shortcut in Excel--that's what an expert friend told me, and I certainly don't know how to do it.
The method of moving the whole thing to MS Word works (my friend gave me step-by-step instructions, involving Styles), but as you point out, there are dangers lurking there. He said he tried the "track changes" route and it did not succeed.

But the good news is, I complained so loudly about this to the client agency, that they decided I didn't need to bother with the red fonts anymore, just the yellow fill in cells that are changed. My new macro works for that, so I'm all set. Hopefully this will greatly speed up the process.
Collapse


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Excel 2010 - macro to change font of selected words






TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »