+ Reply to Thread
Results 1 to 3 of 3

how to make search and replace as text and not a number

  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    how to make search and replace as text and not a number

    i have a cell with the following info in it:
    Please Login or Register  to view this content.
    when i do a search and replace of "-" to make it show as 01101, however excel makes it a number and it formats it this way: 1101.

    how can i strip the code of the dash but preserve the leading zero? looking for a vba solution.

    thoughts anyone?

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: how to make search and replace as text and not a number

    =SUBSTITUTE(A1,"-","") with A1 = 01-101

  3. #3
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    Re: how to make search and replace as text and not a number

    thanks jiejenn, that did the trick

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Current month - number to text with three letters, search & replace
    By gliori in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-25-2015, 08:14 AM
  2. [SOLVED] Search through columns and find specific text and replace that text with header column
    By adamzee in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-09-2014, 11:59 PM
  3. VBA Code - Search text & search number & search qty and result - Urgent Please
    By naresh73 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2014, 10:51 AM
  4. Replies: 1
    Last Post: 02-20-2014, 12:24 PM
  5. search within text file and replace strings with variable number of characters
    By ingolf_ingolfsen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2012, 03:54 AM
  6. [SOLVED] VBA to Search a Text String, Find a Value listed in another column and replace the text
    By Jschrod303 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-16-2012, 08:56 PM
  7. [SOLVED] search for text, then search for previous text, replace 1st text including number from 2nd
    By kldailey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2012, 05:23 PM

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