Thread: Algebra
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Algebra

You could create a named range (in my example NAME) that includes the cells
to be evaluated this way.

You could then add the following code to the worksheet. Select the tab
name and then right click to VIEW CODE to get the code in the correct place.

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count 1 Then Exit Sub
If Not Intersect(Target, Range("Name")) Is Nothing Then
Application.EnableEvents = False
Target.Value = Target.Value + 4
Application.EnableEvents = True
End If

End Sub


"Irish3538" wrote:

I'm not sure if this is even possible, but is there any way to have a cell
have an algebraic equation where entering a number in a specific cell will
run through the equation and spit the number out in that cell? E.g Cell A1
would be "=x+4" so that when you type "2" into cell A1 it would register 6?
It's for work and I can't have the formula routed through something else so
in order to do it I would need it to come out like that, any ideas?