View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
undrline via OfficeKB.com undrline via OfficeKB.com is offline
external usenet poster
 
Posts: 18
Default number formatting

To my knowledge, you can't align cells to each other natively.
What I would do, is separate the number into two columns.

If your number is in cell A1:
The number before the decimal would be
=LEFT(A1,(SEARCH(".",A1))-1)
The number after the decimal would be
=RIGHT(A1,LEN(A1)-SEARCH(".",A1))

To translate:
starting from the left, take this number of characters: the number of
characters until the decimal, excluding the decimal itself

starting from the right, take this number of characters: the amount of
characters in the entire number, except the numbers up to and including the
decimal

Align one column to the left, and one to the right. If you want to keep the
decimal, I would create a centered column width of 1 between the two, that
just has a period in it - but you could also tack it on to either:
=LEFT(A1,(SEARCH(".",A1))-1)&"."
or
="."&RIGHT(A1,LEN(A1)-SEARCH(".",A1))
but you would lose the ability to manipulate the numbers this way, because it
would turn them into a string.


Roger Govier wrote:
Hi Sandy

Who knows???

Columns and rows seem to have been used

please help me put all columns in one straight line


If the OP does both, then hopefully that will resolve the problem
I read it differently:

[quoted text clipped - 13 lines]
2.21
please help me put all columns in one straight line


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200701/1