Excel 2010 - macro to change font of selected words
Thread poster: Susan Welsh
Susan Welsh
Susan Welsh  Identity Verified
United States
Local time: 20:59
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: 02:59
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: 20:59
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






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »