how do i format cells with preceeding zeros & minus sign

G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top