Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default order of magnitude constants

I was wondering if it is possible to get excel to automatically convert
numbers from lets say 10 000 to 10k, or 10 000 000 to 10M etc.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default order of magnitude constants

There is only limited support for formatting:

[<1000000]0,K;[<1000000000]0,,\M

This changes the displayed text but does not change the actual value of the
cell, so math will still work. If all you want it the text in the cell, use
a formula like the following:

=CHOOSE(TRUNC(LOG10(A1)),A1,A1,A1/1000&"K",A1/1000&"K",A1/1000&"K",A1/1000000&"M")

This handles numbers up to 7 digits. Add more options to the CHOOSE function
for more numbers.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Need Help!" <Need wrote in message
...
I was wondering if it is possible to get excel to automatically convert
numbers from lets say 10 000 to 10k, or 10 000 000 to 10M etc.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default order of magnitude constants

One way, assuming only positive numbers:

Format/Cells/Number/Custom

[<1000]General;[<999500]##0,K;#,##0,,\M

In article ,
Need Help! <Need wrote:

I was wondering if it is possible to get excel to automatically convert
numbers from lets say 10 000 to 10k, or 10 000 000 to 10M etc.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default order of magnitude constants

One potential niggle. Using

[<1000000]0,K

will result in values between 999500 and 999999.999999999 being
displayed as

1000K

that may be fine, but it may give a more consistent result to use

[<999500]0,K;0,,\M

which will display those values as

1M



In article ,
"Chip Pearson" wrote:

There is only limited support for formatting:

[<1000000]0,K;[<1000000000]0,,\M

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
Constants In Formulae Barty Excel Discussion (Misc queries) 8 March 15th 07 09:00 PM
Flagging constants [email protected] Excel Worksheet Functions 2 April 3rd 06 07:42 PM
What is a relationship magnitude graphic chart relationship magnitude graphic chart Charts and Charting in Excel 1 March 23rd 06 05:39 PM
More than 2 constants in Index Ashley Excel Worksheet Functions 1 February 11th 05 06:56 AM
constants Confused Excel Discussion (Misc queries) 3 December 2nd 04 05:05 PM


All times are GMT +1. The time now is 01:27 PM.

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"