+ Reply to Thread
Results 1 to 2 of 2

Newbie: VBA solution for making long numbers appear as text

Hybrid View

OM2 Newbie: VBA solution for... 05-27-2015, 09:30 AM
judgeh59 Re: Newbie: VBA solution for... 05-27-2015, 05:35 PM
  1. #1
    Registered User
    Join Date
    03-14-2008
    MS-Off Ver
    2010 (Home) + 365 (Home)
    Posts
    82

    Newbie: VBA solution for making long numbers appear as text

    I have a problem.
    I open a CSV file that has long numbers in, like 98743987457849
    If I make any changes and save as CSV, the number get saved as something like 3.8E+11

    The way I can fix this is to format the cell as text, edit the cell but make no changes and press enter
    Another solution is to create a column next to the column and put something like =A1&"" - but that isn't much use when I want to save

    OK if it's just one or 2 cells - but I have many more and it becomes cumbersome to format cells, edit and press enter

    How can I use VBA to solve?
    How can I format an entire column as text format and then edit (and make no changes) and press enter?
    Or maybe I can create a new column, format it as text, copy the values only to the new column and then delete the original column?

    I'm a complete newbie to VBA and am not even sure how to create VBA and attach to a spreadsheet

    ANY help/pointers would be great

    Thanks


    OM

  2. #2
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Newbie: VBA solution for making long numbers appear as text

    Create a new column next to the numbers

    put this formula in the new column and copy it down...do a copy/paste special to remove the formula and delete the old column.

    If you want to automated it, turn on the macro recorder and follow the "Script" and turn off the recorder...

    HTH

    =TEXT(A1,"####################")
    this will accomodate a 20 digit number....
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

+ 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] different long numbers formatted as text are considered duplicates
    By Peter Sell in forum Excel General
    Replies: 4
    Last Post: 01-10-2014, 10:27 AM
  2. [SOLVED] Separating specific numbers from a long sting of text
    By Platinum3x in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-17-2012, 10:43 PM
  3. [SOLVED] numbers stuck as text not able to convert to numbers anybody have a solution?
    By georgeparker88 in forum Excel General
    Replies: 10
    Last Post: 08-07-2012, 08:43 AM
  4. Nested IF too long? Need solution?
    By YNWA in forum Excel General
    Replies: 1
    Last Post: 06-21-2012, 09:22 AM
  5. Replies: 2
    Last Post: 03-01-2012, 09:38 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