Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Maintaining Leading Zeros (https://www.askmehelpdesk.com/showthread.php?t=136209)

  • Oct 2, 2007, 07:44 AM
    Amyunimus
    Maintaining Leading Zeros
    In column A, I have the numbers 1-48, with leading zeros for the numbers under 10:


    01
    02
    03...

    47
    48


    In the second column, I have v3 or v2 randomly listed.

    v2
    v2
    v3
    v2
    v3

    etc

    I want to make a new column that merges column A and B with an underscore:

    01_v2
    02_v2
    03_v3

    etc.

    When I use " =A1&"_"&B1" I lose the leading zero, and end up with

    1_v2
    2_v2
    3_v3

    etc.

    Is there anyway to maintain the leading zero across this formula? I tried changing the format of both the v2/v3 cells and the result cells to the same custom format I have for the numbers, but that doesn't work.

    Thank you.
    Emily
  • Oct 2, 2007, 07:50 AM
    NeedKarma
    What about setting the format to Text?
  • Oct 2, 2007, 08:05 AM
    Amyunimus
    I think that might work-- do you know if this will interfere with future LOOKUP functions? That is, the lookup function tends to be very picky about ascending order, and I wasn't sure if there would be problems converting some of my numbers to text.
  • Oct 2, 2007, 08:08 AM
    ScottGem
    yes you need to set to Text. Numeric values don't have leading zeros. And no, it wouldn't affect the lookups.

  • All times are GMT -7. The time now is 11:37 PM.