On 04/04/2007 08:34 PM, Brian Barker wrote:
> At 13:28 04/04/2007 -0400, Sandra Schreiber wrote:
>>I am attempting to use an "acccounting" alignment for currency in 
>>Oo2.2 Calc.  I need to line up dollar signs, thousands, hundreds, 
>>tens, decimal points, etc., but cannot figure how to do so.  Please 
>>(1) advise if I can do that in this program and if so (2) how to 
>>format the cell to accomplish this.  See example below.
>>
>>$1,000.00
>>$   500.00
>>$      15.00
>>$        5.00
>>$          .50
> 
> and ...
> 
> At 19:56 04/04/2007 -0400, James Knott wrote:
>>Can this be done with user defined numbers and format codes?
> 
> I think the code needed is:
> [>=1000]$0,000.00;[>=100]$_0_,000.00;[>=10]$_0_,_000.00;[>=1]$_0_,_0_00.00;$_0_,_0_0_0.00
> 
> But this expression needs one element for each decade - five in the 
> example given.  The help text confirms that the maximum permitted is 
> three.  So it's no use.  Unless anyone can see a neater way of 
> expressing this ...
> 
> Brian Barker

I did this manually in Excel for an cash fund ledger some time ago, so I
unzipped the file, loaded it up in Calc & checked. Here is the cell
number definition in Format|Cells|

Numbers tab
Number
Format: (1,234.12) - red
Decimal places: 2
Leading zeros: 1
Negative numbers red: checked
Format code: #,##0.00;[RED]\(#,##0.00\);;@

Alignment tab
Horizontal: Right
Vertical: Default

Note that the above does _not_ use the $ sign as I was never able to
figure that out without a macro (even in Excel).

The following will include the $ sign but it will be positioned next to
the number and not to the far left.
Format code: "$"#,##0.00_);[RED]\("$"#,##0.00\)

If someone has a version of Excel with the 'accounting' feature, then it
should be possible to emulate the format code if they use one; I suspect
that they probably use a macro though.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to