Hi all,
Is there possible by using VBA to convert to number to at least 2 decimal places if the original number is an integer or only 1 decimal place and remain unchanged if more than 2 decimal places.
Some Example:
[TABLE="width: 167"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Before[/TD]
[TD][/TD]
[TD]After[/TD]
[/TR]
[TR]
[TD="align: right"]10.99[/TD]
[TD][/TD]
[TD="align: right"]10.99[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD][/TD]
[TD="align: right"]15.00[/TD]
[/TR]
[TR]
[TD="align: right"]65.777[/TD]
[TD][/TD]
[TD="align: right"]65.777[/TD]
[/TR]
[TR]
[TD="align: right"]187.3[/TD]
[TD][/TD]
[TD="align: right"]187.30[/TD]
[/TR]
[TR]
[TD="align: right"]123.3686[/TD]
[TD][/TD]
[TD="align: right"]123.3686[/TD]
[/TR]
[TR]
[TD="align: right"]70[/TD]
[TD][/TD]
[TD="align: right"]70.00[/TD]
[/TR]
</tbody>[/TABLE]
Thank a lot.
Is there possible by using VBA to convert to number to at least 2 decimal places if the original number is an integer or only 1 decimal place and remain unchanged if more than 2 decimal places.
Some Example:
[TABLE="width: 167"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Before[/TD]
[TD][/TD]
[TD]After[/TD]
[/TR]
[TR]
[TD="align: right"]10.99[/TD]
[TD][/TD]
[TD="align: right"]10.99[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD][/TD]
[TD="align: right"]15.00[/TD]
[/TR]
[TR]
[TD="align: right"]65.777[/TD]
[TD][/TD]
[TD="align: right"]65.777[/TD]
[/TR]
[TR]
[TD="align: right"]187.3[/TD]
[TD][/TD]
[TD="align: right"]187.30[/TD]
[/TR]
[TR]
[TD="align: right"]123.3686[/TD]
[TD][/TD]
[TD="align: right"]123.3686[/TD]
[/TR]
[TR]
[TD="align: right"]70[/TD]
[TD][/TD]
[TD="align: right"]70.00[/TD]
[/TR]
</tbody>[/TABLE]
Thank a lot.