+ Reply to Thread
Results 1 to 4 of 4

Replace functions calculates scientific numbers in text field

  1. #1
    Registered User
    Join Date
    09-18-2015
    Location
    New York
    MS-Off Ver
    2013
    Posts
    31

    Replace functions calculates scientific numbers in text field

    Hello all,

    I have a document that imports data from a text file. There is one column that is imported as text that contains ID strings such as 11A-1, 45D-6, 12E-1, etc.

    When I use excels built in replace function to change anything within the string, it calculates the text field as a scientific number.

    For Example:

    Find "11" and replace with "12"

    Original values Stored as Text

    11E-1
    11E-2
    11E-3
    11E-4
    11E-5
    11E-6

    Desired Result, stored as text:

    12E-1
    12E-2
    12E-3
    12E-4
    12E-5
    12E-6


    Replace with Text Format result:

    1.2
    0.12
    0.012
    0.0012
    0.00012
    0.000012

    Replace with No Format result:

    1.20E+00
    1.20E-01
    1.20E-02
    1.20E-03
    1.20E-04
    1.20E-05


    I don't understand why when replacing a text value in a text formatted cell, excel still calculated the value as a number.....

    All in all very Frustrating. Is there a workaround somewhere? Haven't been able to find anything.

    Thanks,

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Replace functions calculates scientific numbers in text field

    It works if you have a leading apostrophe in the source cell
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Replace functions calculates scientific numbers in text field

    It's the E that is causing excel to assume you want scientific notation.

    When you use find and replace, type a single quote before the Replace with value. '12

    Regards,

    David

  4. #4
    Registered User
    Join Date
    09-18-2015
    Location
    New York
    MS-Off Ver
    2013
    Posts
    31

    Re: Replace functions calculates scientific numbers in text field

    Thanks for your help friends!

+ 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. [SOLVED] VBA code to match numbers from a text field and match to numbers in another text field
    By cinstanl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2016, 02:42 PM
  2. [SOLVED] VBA code to match numbers from a text field and match to numbers in another text field
    By cinstanl in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-08-2016, 02:26 PM
  3. Replies: 8
    Last Post: 08-05-2015, 02:36 PM
  4. Replies: 2
    Last Post: 10-16-2014, 05:45 AM
  5. How to make a loop that calculates against a time field
    By DVFDave in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2013, 06:11 AM
  6. Find/replace scientific notation
    By phrankndonna in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-02-2012, 05:20 PM
  7. [SOLVED] Replace Scientific Format
    By b&s in forum Excel General
    Replies: 1
    Last Post: 08-23-2005, 05:53 AM

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