figuring out taxes

J

justchris

ran into another snag. what im trying to do is take 2 cells, one cell
want you to be able to enter in a value and then have it figure ou
taxes so it would look something like this

cell 1(amount) =x
cell 1(amount with tax taken out)=x/1.072
cell 2(tax) =x-cell 1


this is easy to do with 3 cells my problem is i want it in 2 cells..
guess my question is, would it be possible to make a cell have an inpu
if it has an equation already in it or do i have to do this throug
vba?

any help would be great and thanks for taking the tim
 
B

Bob Phillips

cell 1: =amount/(1+7.2%)
cell 2: =amount-(amount/(1+7.2%))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
J

justchris

ok maybe I wasn’t specific enough on that.. What I need to do is this

Example.1
Cell 1 = (enter amount x) then cell 1 will enter x into the equatio
x*7.2% which is still cell 1.

Cell 2 = x-cell 1

The (enter the amount x) is just an example.
Example.2

Quick and easy definition of what I want to do...
Cell 1 = x
Cell 2 = x *7.2
Cell 3 = cell 2 - cell 1
I want to incorporate cell 1 and cell 2 so they can enter the x righ
over the equation x is like an input number.

example.3
I have the number 72 i need to take 72 enter in to cell 1 then i wan
cell 1 to take that 72put it into an equation then i want to see th
answer to that. is there a way to write a number into a cell withou
erasing the equation or better yet is there a way to make the cell hav
an input number that can be typed in by the user without erasing th
equation?

I have about 4 places on my sheet that could benifit from this. sorr
for the lengthy explaination but i cant think of the word im lookin
for variable maybe... =
 
B

Bob Phillips

You need VBA for this.

In the worksheet code module add this code

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
With Target
.Offset(0, 1).Value = .Value - (.Value * 0.072)
.Value = .Value * 0.072
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

You have changed your formula, so I have used the latest version.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
J

justchris

was wondering if you knew an easier way say this or simplify m
explantions? i need to be able to understand what im doing for futu
refrence and im not quite sure an easy defination of what it is i wa
trying to do
 
B

Bob Phillips

Chris,

I think it wasn't that unclear, I just tried to make a simpler solution at
first. The only suggestion I could make would be something along the lines
of

I want to input an amount, and then automatically calculate the amount less
tax, and the tax, overwriting the amount input.
.... and then your example

But it isn't that much better.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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