Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-15-2016, 06:17 AM
Lumber-jack Lumber-jack is offline Highlighting dates already formatted in existing text Windows 8 Highlighting dates already formatted in existing text Office 2010 64bit
Novice
Highlighting dates already formatted in existing text
 
Join Date: May 2016
Posts: 2
Lumber-jack is on a distinguished road
Question Highlighting dates already formatted in existing text

HI I am not expert at macros.

My problem is that I have indexes with thousands of entries. Each is prefixed with a date of the form "month(space)day(space)year" with the months as abbreviations ( jan, feb, mar, apr, may, jun, jul, aug sept, oct, nov, dec); the day as numeric (eg 1, 10, 30), and the year in full (eg 1870, 1881, 1900).

I want to highlight ( ie Bold ) all these dates automatically throughout out the existing text without changing the font in any other way.

I do not mind if a date entry of the same format but elsewhere in the text gets highlighted in the process.

How can this be done using for example a macro? or am I pipe dreaming?



Thanks, L-j
Reply With Quote
  #2  
Old 05-15-2016, 03:13 PM
macropod's Avatar
macropod macropod is offline Highlighting dates already formatted in existing text Windows 7 64bit Highlighting dates already formatted in existing text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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 can do without the need for a macro, using a wildcard Find/Replace.

You appear to be working with you're working with US-format dates, so try:
Find = <[JFMASOND][anuryebchpilgstmov]{2,8} [0-9]{1,2} [12][0-9]{3}>
Replace = ^&
and setting the replacement font format to bold.

For UK-format dates (d mmm yyyy), the Find/Replace expression would be:
Find = <[0-9]{1,2} [JFMASOND][anuryebchpilgstmov]{2,8} [12][0-9]{3}>
Replace = ^&
and setting the replacement font format to bold.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-18-2016, 04:21 AM
Lumber-jack Lumber-jack is offline Highlighting dates already formatted in existing text Windows 8 Highlighting dates already formatted in existing text Office 2010 64bit
Novice
Highlighting dates already formatted in existing text
 
Join Date: May 2016
Posts: 2
Lumber-jack is on a distinguished road
Default

Thanks Paul, for all your help!
L-j
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlighting dates already formatted in existing text AutoCorrect with Formatted Text pmokover Word 16 10-30-2024 02:50 AM
Highlighting dates already formatted in existing text Unwanted text highlighting AllusiveKitten Word 2 07-20-2015 04:00 PM
Macro to keep formatted form fields after mail merge or replace text with formatted form fields jer85 Word VBA 2 04-05-2015 10:00 PM
Highlighting Text After Sync lvautier OneNote 1 02-07-2015 04:02 PM
Highlighting dates already formatted in existing text Moving formatted text from one table to another Cosmo Word VBA 3 06-24-2014 05:59 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:25 PM.


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