+ Reply to Thread
Results 1 to 2 of 2

Preserving wildcard in Find and Replace

  1. #1
    Registered User
    Join Date
    05-12-2005
    Location
    Yellowknife, NT
    Posts
    1

    Preserving wildcard in Find and Replace

    Trying to convert a column of format 123-45-67.8 to 12345"67.8'
    I can find *-*-* fine but trying to replace with **"*' overwrites my original data with **"*' instead of preserving the wildcard values.

    Is there a way to do this with Regular Expressions or a 3rd party utility or am I stuck writing a VBA function to convert the string (which will lead me to my next question- where to start there?)

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Assuming that Column A contains your data, enter the following formula in B1 and copy down:

    =SUBSTITUTE(SUBSTITUTE(A1,"-","",1),"-","""")&"'"

    Then, select Column B > Edit > Copy > Edit > Paste Special > Values > OK.

    Hope this helps!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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