Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default A ppm format

Is it possible in VBA to make a sub that formats a cell?
I would like to have 0.000005 displayed as 5.00 ppm but I want the value to
remain unchanged.
I guess I am asking how Excel makes .05 display as 5%
Does VBA has access to the 'layer' that displays as opposed to the 'layer'
that stores?
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default A ppm format

AFAIK, there's no way to do this - % is hard-coded.

VBA can only apply valid cell formats to cells. The display engine is
independent of VBA.


In article ,
"Bernard Liengme" wrote:

Is it possible in VBA to make a sub that formats a cell?
I would like to have 0.000005 displayed as 5.00 ppm but I want the value to
remain unchanged.
I guess I am asking how Excel makes .05 display as 5%
Does VBA has access to the 'layer' that displays as opposed to the 'layer'
that stores?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default A ppm format

As I feared, thanks
Excel lets you format rounding to thousands and millions; lets you scale
chart axes likewise. But factors less than 1 are not provided for. Pity!
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"JE McGimpsey" wrote in message
...
AFAIK, there's no way to do this - % is hard-coded.

VBA can only apply valid cell formats to cells. The display engine is
independent of VBA.


In article ,
"Bernard Liengme" wrote:

Is it possible in VBA to make a sub that formats a cell?
I would like to have 0.000005 displayed as 5.00 ppm but I want the value
to
remain unchanged.
I guess I am asking how Excel makes .05 display as 5%
Does VBA has access to the 'layer' that displays as opposed to the
'layer'
that stores?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default A ppm format

On Feb 13, 10:25 am, "Bernard Liengme"
wrote:
As I feared, thanks
Excel lets you format rounding to thousands and millions; lets you scale
chart axes likewise. But factors less than 1 are not provided for. Pity!
--
Bernard V Liengmewww.stfx.ca/people/bliengme
remove caps from email

"JE McGimpsey" wrote in message

...



AFAIK, there's no way to do this - % is hard-coded.


VBA can only apply valid cell formats to cells. The display engine is
independent of VBA.


In article ,
"Bernard Liengme" wrote:


Is it possible in VBA to make a sub that formats a cell?
I would like to have 0.000005 displayed as 5.00 ppm but I want the value
to
remain unchanged.
I guess I am asking how Excel makes .05 display as 5%
Does VBA has access to the 'layer' that displays as opposed to the
'layer'
that stores?- Hide quoted text -


- Show quoted text -


Consider hiding the column of your results containing 0.000005 and
just having a second column to the right saying =A1*1000000&" ppm"

Simple enough:)

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default A ppm format

Yes, I use this but it need one more step. One can do per cent directly, why
not per million?
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"S Davis" wrote in message
ups.com...
On Feb 13, 10:25 am, "Bernard Liengme"
wrote:
As I feared, thanks
Excel lets you format rounding to thousands and millions; lets you scale
chart axes likewise. But factors less than 1 are not provided for. Pity!
--
Bernard V Liengmewww.stfx.ca/people/bliengme
remove caps from email

"JE McGimpsey" wrote in message

...



AFAIK, there's no way to do this - % is hard-coded.


VBA can only apply valid cell formats to cells. The display engine is
independent of VBA.


In article ,
"Bernard Liengme" wrote:


Is it possible in VBA to make a sub that formats a cell?
I would like to have 0.000005 displayed as 5.00 ppm but I want the
value
to
remain unchanged.
I guess I am asking how Excel makes .05 display as 5%
Does VBA has access to the 'layer' that displays as opposed to the
'layer'
that stores?- Hide quoted text -


- Show quoted text -


Consider hiding the column of your results containing 0.000005 and
just having a second column to the right saying =A1*1000000&" ppm"

Simple enough:)



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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
Adding time in 24 hour format to produce hours in decimal format Hercdriver Excel Worksheet Functions 11 December 29th 09 02:06 AM
Need help with converting CUSTOM format/TEXT format to DATE format Deo Cleto Excel Worksheet Functions 6 June 2nd 09 08:14 PM
Replace million-billion number format to lakhs-crores format Sumit Excel Discussion (Misc queries) 1 December 9th 05 04:58 PM
how to format excel format to text format with separator "|" in s. azlan New Users to Excel 1 January 31st 05 12:57 PM


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