Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Alex,
How about selecting the range and setting a custom format of 00000? Regards, Peter Beach "Alex" <. wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=IF(A1="";"";TEXT(A1;"00###"))
-- Regards, Peo Sjoblom "Alex" <. wrote in message ... 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
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Peo Sjoblom wrote:
=IF(A1="";"";TEXT(A1;"00###")) Ah yes, thanks... so simple, sorry. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
wrap text inserts a padding blank line | New Users to Excel | |||
Autofill Down When Text to Left is Not Blank | Excel Worksheet Functions | |||
Validating cells left blank | Excel Programming | |||
counting from left to right and stopping when blank | Excel Discussion (Misc queries) |