Anyone out there know of a macro that will vary the number of significant figures depending upon the result that is contained within the cell? I have a strange problem that I think is being caused by VBA code that is creating a crosstabular report. Values in a database are divided by 1000 then put in the excel tabular report.

The problem arises that some of the values are getting a very small increment 0.00000001 added to them, I believe during the conversion. It is random which values this is happening to.

This results appear strange in the table that they either have scientific notation or are a value like 0.00550001. What I want to do is get rid of the 0.00000001 and then have the number represented with the correct number of significant figures, not in scientific notation.