Thread: Update Data
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Update Data

Try this event macro:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set r = Range("D:D")
If Intersect(t, r) Is Nothing Then Exit Sub
If t.Value < "Paid" Then Exit Sub
Set w1 = Sheets("Sheet1")
Set w2 = Sheets("Sheet2")
Set r1 = Range("A" & t.Row & ":D" & t.Row)
Application.EnableEvents = False
n = w2.Cells(Rows.Count, 1).End(xlUp).Row + 1
r1.Copy
w2.Activate
w2.Cells(n, 1).Select
ActiveSheet.Paste
w1.Activate
Application.EnableEvents = True
End Sub
--
Gary''s Student - gsnu200775


"Abdul Shakeel" wrote:

Hi All,

I have a sheet with Column heads
Date Invoice Number Amount
I want that in column 4 in any row I have write Paid so this Particualr row
Update with all of its contents on Sheet 2