View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default How to display the value in different format?

Eric,

In C1:

=ROUND(B1,IF(A1<0,MAX(0,LOG(A1)),0))

I'm guessing that if A1 is 10, you really want 654.4 (?)

HTH,
Bernie
MS Excel MVP


"Eric" wrote in message
...
There is a number in cell A1, which is selected from a list
0.01, 0.1, 1, 10, 100, 1000
There is a given number 654.356 in cell B1
Does anyone have any suggestions on how to display the value in different
format?
For example,
If the number in cell A1 is 0.01, then 654 should be displayed in cell C1.
If the number in cell A1 is 0.1, then 654 should be displayed in cell C1.
If the number in cell A1 is 1, then 654 should be displayed in cell C1.
If the number in cell A1 is 10, then 654.3 should be displayed in cell C1.
If the number in cell A1 is 100, then 654.36 should be displayed in cell
C1.
If the number in cell A1 is 1000, then 654.356 should be displayed in cell
C1.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric