Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formatting equation output
Hey there!~
I have a label that shows the result of a calculation that is performed in the code. Formula is: lblSalesAmount.Caption = ("$" & ((txtPOAmount.Value * ((txtPercentOffice.Value) / 100))) * (txtPercentSales.Value / 100)) I need to know how to format this so that when the label shows the result it is only two decimal places. Thanks David |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Formatting equation output
Try this:
lblSalesAmount.Caption = Format(((txtPOAmount.Value * ((txtPercentOffice.Value) / 100))) * (txtPercentSales.Value / 100), "$#,##0.00") -IA -----Original Message----- Hey there!~ I have a label that shows the result of a calculation that is performed in the code. Formula is: lblSalesAmount.Caption = ("$" & ((txtPOAmount.Value * ((txtPercentOffice.Value) / 100))) * (txtPercentSales.Value / 100)) I need to know how to format this so that when the label shows the result it is only two decimal places. Thanks David . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formatting Output Range in Combo Box | Excel Discussion (Misc queries) | |||
Formatting text output within formulas | Excel Worksheet Functions | |||
Polynomial equation output | Charts and Charting in Excel | |||
conditional formatting w/ color as input vs output | Excel Worksheet Functions | |||
Formatting data within an equation | Excel Worksheet Functions |