I'm using VBA to input a formula into a cell on a worksheet change. This formula is also taking advantage of a Function to round to significant digits.

My question, how can I show the significant digits in the cell, specifically 4 significant digits? Am I overlooking the obvious? I found this custom format, but it leaves the decimal place.

This is how the digits should show after rounding to 4 significant digits [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 54"]

[tr]

[TD="width: 72, align: right"]1.977[/TD]

[/tr]

[tr]

[TD="align: right"]2[/TD]

[/tr]

[tr]

[TD="align: right"]31.65[/TD]

[/tr]

[tr]

[TD="align: right"]40[/TD]

[/tr]

[/TABLE]

If I use the custom format

[TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 54"]

[tr]

[TD="width: 72, align: right"] [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 54"]

[tr]

[TD="width: 72, align: right"]1.977[/TD]

[/tr]

[tr]

[TD="align: right"]2.[/TD]

[/tr]

[tr]

[TD="align: right"]31.65[/TD]

[/tr]

[tr]

[TD="align: right"]40.[/TD]

[/tr]

[/TABLE]

[/TD]

[/tr]

[tr]

[TD="align: right"] [/TD]

[/tr]

[/TABLE]