"Johnny Rosenberg" <gurus.knu...@gmail.com> wrote in message news:op.vn7stngfxqd...@pb-laptop...
Den 2010-12-22 21:01:13 skrev Harold Fuchs <fuchs.har...@gmail.com>:

On 22/12/2010 19:36, Johnny Rosenberg wrote:
Den 2010-12-22 20:13:58 skrev Paul Cohen <peco...@fairpoint.net>:

Is there any way to format data in a column so that the decimal points
are aligned?

I thought that something like ”0,#####” should work, but it didn't… so now we are two who want to know…

Perhaps you are trying to achieve something I don't understand but, from your question, I'd say simply format the cells with a fixed number of decimal places - Format>Cells>>Numbers>Options>Decimal Places - set the value to, say, 2 and all the decimal points will line up. You can do it for a whole column by selecting the column, or for a range of cells by selecting only those cells. With a value of 2 in the Decimal Places setting a value of 1234 will be shown as 1234.00 and a value 3.4 will show as 3.40 so that the decimal point appears in the right place.

You can also set the next option in that same pane - "Leading Zeros". If you set that to zero then the value 0.1 will appear as .10 but the decimal point will still line up with the others. If you set it to 2 then 0.12 will appear as 00.12 and, again, the decimal point will be in the right place.

I'm sorry, but this seems so fundamental that I think I must have misunderstood something.


You can do this in Writer, as a matter of fact, and I would guess the purpose of this is to line numbers up nicely if the number of decimals are not the same for all the values, like this (you need to use a font like Liberation Mono, Free Mono, Courier or similar for this to look right):
  45.321
   3.9
1325.
2537.99225

Well, you get the point… (hopefully the trailing spaces are not omitted somewhere on the way between now when I send the message and later when you receive it…). The decimal symbol should be in the same position for all the values above.

As I said, in OpenOffice.org Writer you can do this and you can do it for any character, for example the letter ”k”:

Resistance (Ω)
  2k49
  1k
 24k9
249k
and so on.

--
Kind regards

Johnny Rosenberg

In that case I haven't misunderstood and the solution I proposed will work. Calc doesn't use trailing spaces in numbers. In the example you give you'd need to set 5 decimal places. You'd get
 45.32100
     3.90000
     1325.00000
     2537.99225


Or you could use "Scientific" format which would give
4.53E+001
     3.90E+000
     1.33E+003
     2.54E+003


or
4.53E+01
     3.90E+00
     1.33E+03
     2.54E+03


Depending on which option you use.

--
Harold Fuchs
London, England


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-unsubscr...@openoffice.org
For additional commands, e-mail: discuss-h...@openoffice.org

Reply via email to