View Single Post
  #3   Report Post  
Jay
 
Posts: n/a
Default

Bernie:

I need to have this function cover the range of W3:W6000, Z3:Z6000,
AH3:AH6000. I attempted to modify this with no success. Can you assist here
too:

Private Sub Worksheet_Change(ByVal Target As Range)
'Plugging the starting value in column Z and increasing it incrementally
If Target.Address < "$AH$3" Then Exit Sub
Application.EnableEvents = False
Range("W3").Value = Range("W3").Value + 1
Range("Z3").Value = Range("Z3").Value + Target.Value
Application.EnableEvents = True
End Sub

THanks,

"Bernie Deitrick" wrote:

Jay,

You could use the worksheet change event. Copy the code below, right click
on the sheet tab, select "View Code" and paste the code in the window that
appears.

HTH,
Bernie
MS Excel MVP



Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$AH$3" Then Exit Sub
Application.EnableEvents = False
Range("W3").Value = Range("W3").Value + 1
Range("Z3").Value = Range("Z3").Value + Target.Value
Application.EnableEvents = True
End Sub
"Jay" wrote in message
...
What I'd like to do is this. I have two (maybe 4 columns needed) columns,
W3
= (4) and Z3 = (521). What I need to do is add a value to cell AH3 = (71)
and
have cell Z3 increase by that number =(592) and have W3 increase by adding
1
to the value =(5) already in there. However, both the vlues in W3 and Z3
will
be retained until another value is added in column AH3, then, increase
cell
Z3 by that value and cell W3 increase by 1 only each time Z3 increases.

Is this possible?