+ Reply to Thread
Results 1 to 4 of 4

To find any 4 digit number and return the same number with desired formating effect.

  1. #1
    Registered User
    Join Date
    01-31-2011
    Location
    Islamabad, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    23

    To find any 4 digit number and return the same number with desired formating effect.

    I have 200 page document filled with references of other authors work e.g John (1996), Smith & Will (2001), Nancy et al. 2006 etc. I wanted to check that whether I have provided the detailed reference for all these citations at the end. so I am looking for a way where I can find the all year numbers i.e. 1999, 2003 etc and replaced them with same number but highlighted (let say in yellow).

    So how can I search for any four number digit and return the same number with desired formating.

  2. #2
    Registered User
    Join Date
    01-31-2011
    Location
    Islamabad, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: To find any 4 digit number and return the same number with desired formating effect.

    to put in more clearly, i want find and replace command to find any four digit number starting with 19 & 20 and replace it with the same number with formatting i.e. highlight it.

  3. #3
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: To find any 4 digit number and return the same number with desired formating effect.

    Hi neo4u44,

    You can do this with a wildcard Find/Replace, where:
    Find = <[12][90][0-9]{2}>
    Replace = ^&
    with the replacement options set for the required formatting. If there's a risk of spurious matches (eg 1024, 2900) you'll need to use two separate Find expressions, where:
    Find = <19[0-9]{2}>
    Find = <20[0-9]{2}>
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  4. #4
    Registered User
    Join Date
    01-31-2011
    Location
    Islamabad, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    23

    Smile Re: To find any 4 digit number and return the same number with desired formating effect.

    @macropod

    Thank you very much for your kind help. It worked & saved my a lot of time.

    Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1