Adding Tax in excel

H

Humph

Hello,
I have tried to find how to do this almost everywhere in the excel help,
internet and even questions asked in this group to no evail. Could some one
please help.
I am trying to make a work sheet where say, I put a dollar value in J13 of
$100, I would like it to automatically add 10% in the same field. I will
continue this down to J30, then make J31 Total the whole lot.
Is this possible?
Then is it possible to hyde the formula so my clients don't see the Tax value?
I really appreciate your help.
Humph
 
D

Duke Carey

right click on the sheet's tab, choose View Code, and paste this codein

Private Sub Worksheet_Change(ByVal Target As Range)
Const strRange = "J13:J30"
Const Multiplier = 1.1

If Intersect(Target, Range(strRange)) Is Nothing Then Exit Sub

Application.EnableEvents = False

If IsNumeric(Target.Value) Then Target.Value = Multiplier * Target.Value

Application.EnableEvents = True

End Sub
 
H

Humph

Duke,
Your a genius and quick. Thank you so much.
Just for my sake, as I've been trying so long to work it out. How can I do
the same using normal formula method, its killing me.

Humph.
 
D

Duke Carey

You can't enter a value into a cell that has a formula, for you'd overwrite
the formula. Best you can do is enter the value in one column and have the
formula in the next column. When you want to 'finalize' things, copy the
formulas and do an Edit>Paste Special>Values to repalce the formulas with
values.
 
H

Humph

Duke,
Copy that. Now I know why it wasn't working all this time, it was doing just
as you said. And I thought it was me.

Thanks again
Humph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top