Thread: number format
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Stan Scott Stan Scott is offline
external usenet poster
 
Posts: 34
Default number format

Use ROUND, referring to A1. This formula rounds the value in cell D1 to the
number of decimal places in A1:

=ROUND(D1,A1)

Stan Scott
NYC

"LiSa" wrote in message
...
I'd like a person to be able to alter the number of
decimal places in one cell by typing a number in another.

eg if you type 3 in A1 then A2 is formatted to 3 decimal
places.
I've recored a macro to see the code but the number format
is "0.000"

Is there any way of doing this?