+ Reply to Thread
Results 1 to 7 of 7

left padding + blank

  1. #1
    Alex
    Guest

    left padding + blank

    Hello,

    Is it possible to left pad a cell, but only if it's not blank ?

    eg,
    600 => 00600
    50000 => 50000
    [blank] => [blank]

    (I've just succeeded for non-blank cells)

    Thanks in advance.

  2. #2
    Peter Beach
    Guest

    Re: left padding + blank

    Hi Alex,

    How about selecting the range and setting a custom format of 00000?

    Regards,

    Peter Beach

    "Alex" <.> wrote in message
    news:[email protected]...
    > Hello,
    >
    > Is it possible to left pad a cell, but only if it's not blank ?
    >
    > eg,
    > 600 => 00600
    > 50000 => 50000
    > [blank] => [blank]
    >
    > (I've just succeeded for non-blank cells)
    >
    > Thanks in advance.




  3. #3
    Alex
    Guest

    Re: left padding + blank

    Peter Beach wrote:
    > Hi Alex,
    >
    > How about selecting the range and setting a custom format of 00000?
    >
    > Regards,


    Thanks for your answer...
    But I don't think I can do that, as the formatted cell is the result of
    another cell (a column of cells) in another sheet...

  4. #4
    Pete
    Guest

    Re: left padding + blank

    If you are saying that the cell contains a formula which brings a value
    from somewhere else, then it doesn't matter - the format of this cell
    can be set independently of the other cell(s). Try it, and see if it
    does what you want.

    If there is a formula in the cell you are trying to format, then the
    formula could be modified to give you the effect you are wanting -
    please post it here.

    Pete


  5. #5
    Alex
    Guest

    Re: left padding + blank

    Pete wrote:

    > If you are saying that the cell contains a formula which brings a value
    > from somewhere else, then it doesn't matter - the format of this cell
    > can be set independently of the other cell(s). Try it, and see if it
    > does what you want.
    >
    > If there is a formula in the cell you are trying to format, then the
    > formula could be modified to give you the effect you are wanting -
    > please post it here.


    It's just something like that : =TEXT(A1;"00###")
    For blank cells, I get "00", but I would want the cells to remain blank...

  6. #6
    Peo Sjoblom
    Guest

    Re: left padding + blank

    =IF(A1="";"";TEXT(A1;"00###"))


    --

    Regards,

    Peo Sjoblom

    "Alex" <.> wrote in message
    news:[email protected]...
    > Pete wrote:
    >
    > > If you are saying that the cell contains a formula which brings a value
    > > from somewhere else, then it doesn't matter - the format of this cell
    > > can be set independently of the other cell(s). Try it, and see if it
    > > does what you want.
    > >
    > > If there is a formula in the cell you are trying to format, then the
    > > formula could be modified to give you the effect you are wanting -
    > > please post it here.

    >
    > It's just something like that : =TEXT(A1;"00###")
    > For blank cells, I get "00", but I would want the cells to remain blank...




  7. #7
    Alex
    Guest

    Re: left padding + blank

    Peo Sjoblom wrote:
    > =IF(A1="";"";TEXT(A1;"00###"))


    Ah yes, thanks... so simple, sorry.

+ 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