Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-15-2017, 03:10 PM
epid011 epid011 is offline How to change the font color of specific text within a Word table cell Windows 7 64bit How to change the font color of specific text within a Word table cell Office 2010 32bit
Novice
How to change the font color of specific text within a Word table cell
 
Join Date: Dec 2013
Posts: 12
epid011 is on a distinguished road
Default How to change the font color of specific text within a Word table cell

I have hundreds of Word tables that have data cells formatted like:
13.45 [56.34]

I know how to highlight or change the font color for the entire cell, but what I want to be able to do is programmatically change ONLY the color of the numbers within the brackets. So the cell would look like:


13.45 [56.34]

Thanks in advance.

Robert
Reply With Quote
  #2  
Old 05-15-2017, 04:45 PM
macropod's Avatar
macropod macropod is offline How to change the font color of specific text within a Word table cell Windows 7 64bit How to change the font color of specific text within a Word table cell Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could do that via two wildcard Find/Replace operations, where:
Find = \[[0-9.]{1,}]\]
Replace = ^&
and you set the replacement font colour to whatever you want, then
Find = [\[\]]
Replace = ^&
and you set the replacement font colour to whatever the default was.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-15-2017, 05:21 PM
macropod's Avatar
macropod macropod is offline How to change the font color of specific text within a Word table cell Windows 7 64bit How to change the font color of specific text within a Word table cell Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Cross-posted at: http://www.vbaexpress.com/forum/show...ord-table-cell
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
change font color, vba table

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced Font Color Manipulation In Word: Inserting another color than the surrounding text stuartg Word 1 02-20-2017 12:38 AM
How to change the font color of specific text within a Word table cell VBA Table – Search All Tables - Find & Replace Text in Table Cell With Specific Background Color jc491 Word VBA 8 09-30-2015 06:10 AM
How to change the font color of specific text within a Word table cell Table, font color based on what word is in cell donaldadams1951 Word Tables 1 04-15-2015 08:37 PM
How to change the font color of cell values sky474 Excel 7 03-06-2014 09:15 AM
how to search and replace BOLD text >> font color change? dylansmith Word 4 03-12-2013 09:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft