Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 3
Default Create Calucated Field in a Userform

Hello

I have created a userform with approx 10 fields. 3 of the fields are numeric where a number is entered. These fields a

No of Hours
Rate Per Hour
Tonnes

I have created a field which is calcuation of the above as follows:

Customer ABC (This customer pays for the tonnes)

No. of Hours = 10
Rate Per Hour = $100
Tonnes = 2

The charge to the customer for each tonne is $50 per tonne

The calculated field is called "Amount to Charge customer" The calcuatation is [10 x $100] + [2 x $50] = $1,100

I can put a formula into the field "Amount Charged to Customer" as shown above. However, there is a further compliation in that some customers do not pay for tonnes. For example:

Customer XYZ (This customer does not pay for the tonnes)

No. of Hours = 8
Rate Per Hour = $100
Tonnes = 2

The calculated field is called "Amount to Charge customer" The calcuatation for Customer XYZ is [8 x $100] + [0 x $50] = $800

In my userform, I have about 100 customers. 95 of the customers pay for the tonnes like Customer ABC with only 5 of them who do not pay for the tonnes like Customer XYZ.

Is there a VB code I can use that would calculate the correct amount for each customer in each situation?

Any feedback would be helpful.

Thanks
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
userform Field forcing Capital Letters - Thank you Eduardo Excel Discussion (Misc queries) 3 January 23rd 09 06:19 PM
coping and create new userform ASU Excel Discussion (Misc queries) 0 July 25th 06 12:54 PM
create formula. 1 field constant and another field varies by inpu. telnettech Setting up and Configuration of Excel 2 February 2nd 06 11:09 PM
create a userform to populate a diagram with the forms info Mic Excel Discussion (Misc queries) 0 July 22nd 05 08:07 PM
How can I create and display a chart dynamically on a UserForm wi. cc Charts and Charting in Excel 1 February 14th 05 02:44 PM


All times are GMT +1. The time now is 07:01 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"