Thread
:
Noob question
View Single Post
#
3
Sandy Mann
Posts: n/a
A cell cannot contain a user entered value and a formula at te same time. I
think that you would need an Event Macro. Right-click on the sheet tab and
try something like:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = Range("A1").Address Then
Cells(1, 2).Value = Target.Value * 2.5
End If
If Target.Address = Range("B1").Address Then
Cells(1, 1).Value = Target.Value / 2.5
End If
Application.EnableEvents = True
End Sub
Entering a value in A1 or B1 will cause the other cell to calculate
--
HTH
Sandy
Replace@mailinator with @tiscali.co.uk
"letmeplay1977" wrote in message
...
Im sure this is a real simple thing to do, but I wasn't able to find
anything using the forum search. This is probably because i don't
know what I am trying to do is called.
Basically, I have two values that are related to each other. Right now
i have it set up so that one value (A) is a user-entered value and the
other one (B)is calculated based on the entered value(A). This works
great, but i would also like to make it so that if i chose, i could
enter a value for B and A would be calculated based on that. Im
looking for flexibility so that i don't have to create another
worksheet with the inverse operation. I want to be able to enter A or B
and have the other automatically calculated. Other values in the
worksheet are based on these two values, so they would have to work out
also.
Sorry for the rookie question, and thanks for any replies!
--
letmeplay1977
Reply With Quote