View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] mark.diffley@gmail.com is offline
external usenet poster
 
Posts: 9
Default Using worksheet_change to change value of target cell??

Is it possible to change the data within a cell based on what is
entered?

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("C16:F39"), Target) Then

x = Target
Range(Target.Address) = x + Range(F11)

End If

End Sub

I tried using this but got a Run Time '1004' error.

Basically, the user is inputing a number and I want to add a constant
from another cell to this number for the output. I know I can do this
with two tables or two sheets but I was hoping I could have it
automatically update the same cell.


Thanks,

Mark