ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Custom number formatting (https://www.excelbanter.com/excel-programming/365283-custom-number-formatting.html)

Don

Custom number formatting
 
Hi all,

I am trying to format a number that can be in the range + or - xxxxxx.
I have formatted such that it reads:
[<1000000]0.00,"Kbps";[=1000000]0.00,,"Mbps";General
The formatting works for all positive values (eg 9394000 is output as
9.39Mbps, 128000 is output as 128.00Kbps). I cannot however get the negative
values formatted correctly? -192000 is output as -192Kbps which is correct,
but -1344000 is output as -1344.00Kbps instead of -1.34Mbps?

I suspect the issue is very trivial - but cannot locate : (
Help really appreciated!

Thx,

Don

Mike Fogleman

Custom number formatting
 
I think you are stuck with what you have. Your first section is formatting
all numbers <1000000, which of course would include all negative numbers, so
they will all be "Kbps". So only positive numbers 1000000 will be "Mbps".
Excel doesn't allow for any more conditions in custom formatting to take
this any further. Besides, if you are dealing with -bps then you have
discovered how to send data back into the past. I don't think Microsoft can
deal with that yet.
Just my $0.02

Mike F
"Don" wrote in message
...
Hi all,

I am trying to format a number that can be in the range + or - xxxxxx.
I have formatted such that it reads:
[<1000000]0.00,"Kbps";[=1000000]0.00,,"Mbps";General
The formatting works for all positive values (eg 9394000 is output as
9.39Mbps, 128000 is output as 128.00Kbps). I cannot however get the
negative
values formatted correctly? -192000 is output as -192Kbps which is
correct,
but -1344000 is output as -1344.00Kbps instead of -1.34Mbps?

I suspect the issue is very trivial - but cannot locate : (
Help really appreciated!

Thx,

Don





All times are GMT +1. The time now is 08:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com