+ Reply to Thread
Results 1 to 3 of 3

How do I maintain leading 0 in find replace; currently converts "086.XXX " to 86 not "086"

  1. #1
    Registered User
    Join Date
    03-11-2016
    Location
    London
    MS-Off Ver
    2007
    Posts
    1

    How do I maintain leading 0 in find replace; currently converts "086.XXX " to 86 not "086"

    I have an account field that may have account numbers that have leading 0's. The field is 086.acct for example. When I use a find and replace for .acct to blank or to " " as text format the result is always 86 stored as a number. How do I remove the extra text without losing the leading 0 and text format?
    Last edited by cheswick; 05-23-2018 at 04:08 PM.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How do I maintain leading 0 in find replace; currently converts "086.XXX " to 86 not "

    Set the NumberFormat of the cell to show three digits.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: How do I maintain leading 0 in find replace; currently converts "086.XXX " to 86 not "

    I would suggest making sure you format the cells to TEXT 1st
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Replies: 3
    Last Post: 05-02-2018, 08:03 AM
  2. Replies: 4
    Last Post: 08-20-2014, 07:14 AM
  3. Replies: 6
    Last Post: 03-07-2014, 10:34 PM
  4. Find id"" and replace with id"consecutive number" 3071 entries
    By RoyLittle0 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-19-2012, 07:27 AM
  5. Replies: 2
    Last Post: 07-17-2006, 06:55 PM
  6. Replace dialog should put focus on "Find What" not "Replace With"
    By Michael Williams in forum Excel General
    Replies: 0
    Last Post: 05-24-2006, 07:50 AM
  7. Replies: 2
    Last Post: 09-01-2005, 05:05 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