AutoFit

S

Sara

Hi

When I use the AutoFit function in my VB Application, to format a Excelsheet the numbers in the column formats. From being 230,1 to 230,144444444. Why?

Thanks in advance

/Sara
 
D

Dave Peterson

My guess is your number is really 230,144444444. You could format the number to
show fewer decimals or even use a worksheet function to round it. =round(a1,3)
for example.

But if your cell is formatted as General and you have that number in it, then if
you shrink the columnwidth, excel will adjust the display (but not the
underlying value). Widen it using autofit (manually or in code) will show all
the digits.
 
Top