Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 122
Default aligning by decimal point - negative and positive numbers

I am trying to align my columns by decimal point. I have both negative and
positive numbers, as well as asterisks (to show statistical significance) and
so using Format|Cells|Number and trying the number, currency, and accounting
options don't seem to work, nor does the custom option when I try ##.???? or
-#.????.

For example, I have the following numbers I want to line up:
-0.2684***
-0.2602***
0.7165**
1.0023

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default aligning by decimal point - negative and positive numbers

This is for 5 digits before and 8 after the period:

=REPT(" ",5-LEN(LEFT(A1,FIND(".",A1))))&LEFT(A1,FIND(".",A1))& RIGHT(A1,LEN(A1)-FIND(".",A1))&REPT("
",8-LEN(RIGHT(A1,LEN(A1)-FIND(".",A1))))

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Melissa" wrote in message ...
|I am trying to align my columns by decimal point. I have both negative and
| positive numbers, as well as asterisks (to show statistical significance) and
| so using Format|Cells|Number and trying the number, currency, and accounting
| options don't seem to work, nor does the custom option when I try ##.???? or
| -#.????.
|
| For example, I have the following numbers I want to line up:
| -0.2684***
| -0.2602***
| 0.7165**
| 1.0023
|
| Any suggestions?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default aligning by decimal point - negative and positive numbers

Note that there is probably a space where the line wraps. There are no two consecutive quotation marks in this formula. If there
seems to be, there should be a space in-between.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Niek Otten" wrote in message ...
| This is for 5 digits before and 8 after the period:
|
| =REPT(" ",5-LEN(LEFT(A1,FIND(".",A1))))&LEFT(A1,FIND(".",A1))& RIGHT(A1,LEN(A1)-FIND(".",A1))&REPT("
| ",8-LEN(RIGHT(A1,LEN(A1)-FIND(".",A1))))
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "Melissa" wrote in message ...
||I am trying to align my columns by decimal point. I have both negative and
|| positive numbers, as well as asterisks (to show statistical significance) and
|| so using Format|Cells|Number and trying the number, currency, and accounting
|| options don't seem to work, nor does the custom option when I try ##.???? or
|| -#.????.
||
|| For example, I have the following numbers I want to line up:
|| -0.2684***
|| -0.2602***
|| 0.7165**
|| 1.0023
||
|| Any suggestions?
|
|


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default aligning by decimal point - negative and positive numbers

On Thu, 19 Jun 2008 09:38:01 -0700, Melissa
wrote:

I am trying to align my columns by decimal point. I have both negative and
positive numbers, as well as asterisks (to show statistical significance) and
so using Format|Cells|Number and trying the number, currency, and accounting
options don't seem to work, nor does the custom option when I try ##.???? or
-#.????.

For example, I have the following numbers I want to line up:
-0.2684***
-0.2602***
0.7165**
1.0023

Any suggestions?


I don't know how you are adding on the asterisks -- but if you are just
concatenating them, then those values will be TEXT and the others numeric. In
any event, you won't be able to line them up unless you know how many asterisks
are present.

But, if you could use a different number format depending on the statistical
significance, and if the maximum number of asterisks is 4, then following
formats should work (with a right-aligned cell:

No Asterisks:

_-#,##0.0000_*_*_*_*;-#,##0.0000_*_*_*_*;0.0000_*_*_*_*;@

1 Asterisk:
_-#,##0.0000"*"_*_*_*;-#,##0.0000"*"_*_*_*;0.0000"*"_*_*_*;@

2 Asterisks:
_-#,##0.0000"**"_*_*;-#,##0.0000"**"_*_*;0.0000"**"_*_*;@

3 Asterisks:
_-#,##0.0000"***"_*;-#,##0.0000"***"_*;0.0000"***"_*;@

4 Asterisks:
_-#,##0.0000"****";-#,##0.0000"****";0.0000"****";@

--ron
  #5   Report Post  
t_g t_g is offline
Junior Member
 
Posts: 1
Default

I know this post might be a bit outdated, but still:
has anyone been able to solve this problem?!
If so, IŽd be happy, if you could help me here!
The solution of Ron Rosenfeld unfortuenately does not work for me.




I am trying to align my columns by decimal point. I have both negative and
positive numbers, as well as asterisks (to show statistical significance) and
so using Format|Cells|Number and trying the number, currency, and accounting
options don't seem to work, nor does the custom option when I try ##.???? or
-#.????.

For example, I have the following numbers I want to line up:
-0.2684***
-0.2602***
0.7165**
1.0023

Any suggestions? [/i][/color]
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
Excel, change column of negative numbers to positive numbers? Nita New Users to Excel 3 November 27th 07 04:54 AM
Excel 2002 : Convert Positive Numbers to Negative Numbers ? Mr. Low Excel Discussion (Misc queries) 2 November 6th 06 03:30 PM
aligning decimal point in a column of figures in Excel Fonda Excel Worksheet Functions 1 August 3rd 06 04:59 PM
Aligning decimal numers to the centre of the cell and aligning dec Ramesh Babu Excel Discussion (Misc queries) 1 July 1st 06 10:33 PM
convert negative numbers to positive numbers and vice versa bill gras Excel Worksheet Functions 4 December 7th 05 01:39 AM


All times are GMT +1. The time now is 01:54 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"