Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Homer
 
Posts: n/a
Default how do i format cells with preceeding zeros & minus sign

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!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Roger Govier
 
Posts: n/a
Default how do i format cells with preceeding zeros & minus sign

Hi Homer

FormatCellsNumberCustom000000000000
Then as you paste values to the cell, they will be padded to 12 digits
with a negative sign in front where necessary

--
Regards

Roger Govier


"Homer" wrote in message
...
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!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default how do i format cells with preceeding zeros & minus sign

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


"Homer" wrote:

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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
want format cells alignment not format cells font style Jeannie Bean Excel Discussion (Misc queries) 2 February 10th 06 09:31 AM
Format Cells - Accounting - Discrepancy? Lost4Now Excel Discussion (Misc queries) 3 February 5th 06 05:10 PM
Why will my cells not format? Jamie Kelly New Users to Excel 3 January 13th 06 06:41 PM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
Protected cells -automatically format to a different color Fred Evans Excel Discussion (Misc queries) 9 December 3rd 04 12:59 PM


All times are GMT +1. The time now is 07:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"