PC Review


Reply
Thread Tools Rate Thread

aligning by decimal point - negative and positive numbers

 
 
Melissa
Guest
Posts: n/a
 
      19th Jun 2008
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?
 
Reply With Quote
 
 
 
 
Niek Otten
Guest
Posts: n/a
 
      19th Jun 2008
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" <(E-Mail Removed)> wrote in message news:B7C01F05-BBE3-4F3D-B676-(E-Mail Removed)...
|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?


 
Reply With Quote
 
Niek Otten
Guest
Posts: n/a
 
      19th Jun 2008
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
| 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" <(E-Mail Removed)> wrote in message news:B7C01F05-BBE3-4F3D-B676-(E-Mail Removed)...
||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?
|
|


 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      19th Jun 2008
On Thu, 19 Jun 2008 09:38:01 -0700, Melissa <(E-Mail Removed)>
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel, change column of negative numbers to positive numbers? Nita Microsoft Excel New Users 3 27th Nov 2007 04:54 AM
Excel 2002 : Convert Positive Numbers to Negative Numbers ? =?Utf-8?B?TXIuIExvdw==?= Microsoft Excel Misc 2 6th Nov 2006 03:30 PM
change 2000 cells (negative numbers) into positive numbers =?Utf-8?B?bGlzYmVybg==?= Microsoft Excel Worksheet Functions 2 16th Aug 2006 05:54 PM
convert negative numbers to positive numbers and vice versa =?Utf-8?B?YmlsbCBncmFz?= Microsoft Excel Worksheet Functions 4 7th Dec 2005 01:39 AM
Change positive numbers (debits) to negative numbers (credits) =?Utf-8?B?Q2FybGEgR2lsbGVzcw==?= Microsoft Access VBA Modules 4 17th Dec 2004 06:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:44 AM.