A ppm format

  • Thread starter Thread starter Bernard Liengme
  • Start date Start date
B

Bernard Liengme

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?
 
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.
 
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!
 
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




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.

- 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:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top