User
Form to perform calculations


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


Home  

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 userform – 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 textboxes 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 to see how this is done quickly and easily: 



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