Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting Output Range in Combo Box V2 Excel Discussion (Misc queries) 2 February 23rd 09 01:10 PM
Formatting text output within formulas Colin Hayes Excel Worksheet Functions 1 January 16th 09 02:04 PM
Polynomial equation output Rob Charts and Charting in Excel 2 August 27th 08 08:20 PM
conditional formatting w/ color as input vs output tom Excel Worksheet Functions 3 December 13th 06 02:34 AM
Formatting data within an equation jonrtait Excel Worksheet Functions 2 November 1st 05 09:19 PM


All times are GMT +1. The time now is 08:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"