how do i format cells with preceeding zeros & minus sign

H

Homer

Hi

I am downloading data in to excel & need to format an amount field in to a
fixed 12 character field i.e. prefix with zeros to fill the 12 chars. NOW
comes the tricky bit, if the value is negative I need the (-) minus sign
prior to any leading zeros.

Help Please!
 
R

Roger Govier

Hi Homer

Format>Cells>Number>Custom>000000000000
Then as you paste values to the cell, they will be padded to 12 digits
with a negative sign in front where necessary
 
R

Ron Coderre

If you are looking to fill a fixed, 12-character field, try this:

Select the cells to be impacted

From the Excel main menu:
<format><cells><number tab>
Category: custom
Type: 000000000000;-00000000000;000000000000

That format will always present 12 characters. Notice the difference
between the positive or zero format vs neg:
000000000000
-00000000000

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP
 
Top