Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Update Data
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Update Data
Dear Gary,
Your code is mind blowing thanks for this. "Gary''s Student" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Update data linked between worksheets when resorting data | Excel Discussion (Misc queries) | |||
update a Pivot Table with new data added to the base data | Excel Discussion (Misc queries) | |||
how to update data displayed from a UDF when the source data chang | New Users to Excel | |||
data update | Excel Discussion (Misc queries) | |||
Update a chart immediately after inputting data into data source | Charts and Charting in Excel |