ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   User Form Formula ? (https://www.excelbanter.com/new-users-excel/33293-user-form-formula.html)

mully

User Form Formula ?
 
Hi

On a user form I have 2 Text Boxes in which to enter cash figures Excluding
TAX - on the worksheet these 2 figures enter columns E & G - in column K I
have the formula =IF(SUM(E3+G3)=0"", SUM(E3+G3)*17.5% - If I create a new
Text Box on the user form could it generate the Tax as the formula above and
then on clicking Add Iformation Button it would enter column K thus doing
away with the formula in column K on the worksheet which is sometimes altered
by mistake.

Any help much appreciated

Cheers ---- Mully

Bob Phillips

Yes,

you could add

TextBox3.Text = Format(CStr((Val(TextBox1.Text) + Val(TextBox2.Text)) *
0.175), "#,##0.00")

to each textbox change event and dump to the worksheet as with the other
amounts

Worksheets("Sheet1").Range("K2").Text = Textbox3.Text

--
HTH

Bob Phillips

"mully" wrote in message
...
Hi

On a user form I have 2 Text Boxes in which to enter cash figures

Excluding
TAX - on the worksheet these 2 figures enter columns E & G - in column K

I
have the formula =IF(SUM(E3+G3)=0"", SUM(E3+G3)*17.5% - If I create a new
Text Box on the user form could it generate the Tax as the formula above

and
then on clicking Add Iformation Button it would enter column K thus doing
away with the formula in column K on the worksheet which is sometimes

altered
by mistake.

Any help much appreciated

Cheers ---- Mully




mully

Hi Bob
Not long till season kicks off again - can we stop Chelse this year????

Right tried what you suggested on entering data in textbox1 & 2 nothing
appears in textbox 3 however on clicking add info - textboxes 1 & 2 info
enters their respective cells on the sheet and on the userform text box 3
then shows 0.00 click add info again and it places 0.00 in column K in the
next row down - what am I doing wrong

Cheers ---- Mully

"Bob Phillips" wrote:

Yes,

you could add

TextBox3.Text = Format(CStr((Val(TextBox1.Text) + Val(TextBox2.Text)) *
0.175), "#,##0.00")

to each textbox change event and dump to the worksheet as with the other
amounts

Worksheets("Sheet1").Range("K2").Text = Textbox3.Text

--
HTH

Bob Phillips

"mully" wrote in message
...
Hi

On a user form I have 2 Text Boxes in which to enter cash figures

Excluding
TAX - on the worksheet these 2 figures enter columns E & G - in column K

I
have the formula =IF(SUM(E3+G3)=0"", SUM(E3+G3)*17.5% - If I create a new
Text Box on the user form could it generate the Tax as the formula above

and
then on clicking Add Iformation Button it would enter column K thus doing
away with the formula in column K on the worksheet which is sometimes

altered
by mistake.

Any help much appreciated

Cheers ---- Mully






All times are GMT +1. The time now is 10:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com