+ Reply to Thread
Results 1 to 5 of 5

Retaining number format

  1. #1
    Registered User
    Join Date
    12-22-2009
    Location
    Pune, India
    MS-Off Ver
    Excel 2003
    Posts
    30

    Retaining number format

    Hello everyone,

    First of all i want to thank everyone for the help they provide here.

    I am facing difficulties in retaining the number format in excel sheet.
    Example: I am pasting the number ‘123456789112345789’ to excel cell but displays as this ‘1.23457E+17’ then again I mail merge this number to word and it gives me the output as ‘1.23457E+17’. I want to have my end result in merged doc as ‘123456789112345789’ not the changed one.

    Can anyone help in solving this for me?

    Thank you

    p.s: sometimes the number copied has letter in between them.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retaining number format

    Place an apostrophe at the start of that string and it will be accepted as text. You can format the entire column as TEXT before you start entering values to help this as well.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Retaining number format

    Excel cannot go past 15 digits of precision.. so your number is automatically converted.

    You will need to paste it in to a cell that is preformatted as text or add an apostrophe in front.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    12-22-2009
    Location
    Pune, India
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Retaining number format

    I did both the steps: I preformatted the cell the text but it does not work. All i am doing is i am capturing this 16 digit number from web based application pasting it into excel which is then merged to a word document. I am doing all this thru a VBA macro code.

    The main issue is i am not able to give the excat number as seen in web app in word document.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Retaining number format

    You have to format the cells as text first, then copy/paste or enter into the cell.

+ 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