+ Reply to Thread
Results 1 to 21 of 21

Copy numbers that are being custom formatted

Hybrid View

  1. #1
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Copy numbers that are being custom formatted

    Column A has a custom format of 000. Therefore the numbers in that column always have leading zeroes if they're less than 3 digits long.

    I want to copy these leading zeroes to another column, but I DON'T want to have to custom format the new column. I just want the values copied over with any leading zeroes, if applicable.

    When I "Paste Special" and select "Values", numbers like "1" that show up as "001" in Column A will show up as "1" again in the new column. How can I get the actual value "001" to be all that's in the new column?

    If it's easier for you, pretend I need to copy over these custom formatted values in to another program which does not retain any custom formatting.

    Thanks!

  2. #2
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: How do I copy numbers that are being custom formatted?

    And using a formula wouldn't work? Cause if it doens't matter to you, then there are several ways to do that. One of them would be to just have a simple cell reference, i.e., =A1, etc.

    Please advice further...

    Ron
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  3. #3
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: How do I copy numbers that are being custom formatted?

    Quote Originally Posted by ron2k_1 View Post
    And using a formula wouldn't work? Cause if it doens't matter to you, then there are several ways to do that. One of them would be to just have a simple cell reference, i.e., =A1, etc.

    Please advice further...

    Ron
    Although "1" appears as "001", if you click on the cell it still has just the value of "1". I need it to actually be "001", not just appear that way.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How do I copy numbers that are being custom formatted?

    If you want it to "be" 001 instead of 1, then it is no longer seen as a number. you would use the formula (e.g. in B1)
    =TEXT(A1,"000")
    If you want to remove the formula, you'd then Copy>Paste Special>Values over top of the formula.
    Last edited by ChemistB; 11-13-2009 at 05:06 PM.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: How do I copy numbers that are being custom formatted?

    But if I compare B1 to 001, e.g., IF(B1=001), then it will fail, right? I want 001 to appear in B1. Excel is being silly.
    Last edited by shg; 11-13-2009 at 05:20 PM. Reason: deleted spurious quote

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How do I copy numbers that are being custom formatted?

    But if I compare B1 to 001, e.g., IF(B1=001), then it will fail, right?
    Correct! If in another cell, you wish to compare them, then you would need the formula
    =IF(VALUE(B1)=A1,....)
    or
    =IF(B1+0=A1,....)
    Why is it so important for the leading zeros to be real instead of virtual?

  7. #7
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: How do I copy numbers that are being custom formatted?

    How can I get the actual value "001" to be all that's in the new column?


    The same way you got the numbers to retain the leading zeros in column A.
    Why did you have to do it in column A?

    Unless you want to make them TEXT.

+ 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