# User Form to perform calculations

Excel 2007 Excel 2003 Macros Excel 2007 Macros Excel 2003 Excel 2010

A question on how to perform calculations in a user form by one of our website visitors, Marshall

Dear Dinesh,
I want the user to input the Gas Units  in a user-form – say 12724  and have this multiplied by a fixed number, say 3.521p and divided by 100 to get pounds.
Now input the Gas day rate – say 20.71p and have this multiplied by 365 and divided by 100 to get pounds.
The results of these 2 calc is automatically shown in the Total Gas per year text box.

Repeat this process for Electric with the results for the 2 calcs  shown in the Total Electric per year text box: Electricity Day rate is 28.31, Electricity units are 6350.

Finally, these 2 results shown automatically in the Total Gas & Total electric box by adding them together.
Marshall

The details of creating an user form have been explained earlier. The main thing to remember about text-boxes is that they hold text data even when you enter numbers. The data has to be converted into numbers using the 'val' function.

Watch the video below  (about 10 MB) to see how this is done quickly and easily:

More Tips (Solutions):
How do I view and edit Microsoft Excel files on an iPad?
Inventory Soluton
How to rename and color worksheet tabs
Copy Worksheet Quickly
Criteria Range
Animations in Microsoft Excel
Create two charts at once
How to avoid errors while working in Excel
How to benefit from Microsoft Excel Templates
How to use Microsoft Excel 2007 with Word 2007 - create mail merge labels
Landscape Oriented Worksheet Template
How to-make a worksheet fit a printed page
How to make your charts more impressive
Perpetual Calendar from 1900 to 9999
How to clear  conditional formattng  in Excel worksheets
How to speed up data entry of decimal numbers
How to change the color of the gridlines of an Excel worksheet or hide them
How to use Autosum in Multiple Worksheet Cells Quickly
How to have your free personal assistant in Mcrosoft Excel who reads out the data to you
How to use the status bar in Microsoft Excel to do a quick data analysis
How to calculate equal monthly payments or instalments using a mathematical equation
Data Forms to Enter and Edit Data
View 2 worksheets in same workbook side by side
Accessing a specific worksheet in large workbooks with multiple worksheets
Referencing a cell in another worksheet
How to perform a what-if analysis using a scrollbar form control
An interesting payroll solution
Future Value Solution in Microsoft Excel
Another Interesting Conditional Formatting Solution
DSUM and Array Formulas for addition solutions
IF Function Question
How to use command buttons on a splash screen in MS-Excel
Copy Paste Data from one Excel Worksheet to Another
How to separate comma separated values (csv) in a worksheet cell in Microsoft Excel into rows or columns
Another Interesting Solver solution in Microsoft Excel
Find duplicates in two different Excel worksheets using a macro
How to count data based on multiple criteria - countifs function
How to convert 6/5/2011 into Sunday, 6/5/2011

Excel 2007 Excel 2003 Macros Excel 2007 Macros Excel 2003 Excel 2010

Take a two click survey and help us improve our services