A
albertmb
Hi Everyone,
On the 15-01-2010 Micky was so kind to send me this macro which I found most
valuble. I tried to reach him again through the Q&A we started but it seems
we lost contact. Can anyone please help me adjust this macro to my specific
needs.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Application.EnableEvents = False
LR = Sheets("Sheet2").Cells(Rows.Count, 4).End(xlUp).Row
If IsEmpty(Sheets("Sheet2").Cells(1, 4)) Then
Target.Cut Sheets("Sheet2").Cells(LR, 4)
Else
Target.Cut Sheets("Sheet2").Cells(LR, 4).Offset(1)
End If
Application.EnableEvents = True
End If
End Sub
============
Micky
Can this macro be applied to a range of cells as
the 'Target Adress?
What I would like is that the data will be transfered to 'Sheet2' after the
complition of the last cell in the range of the 'Target Address'
Ex: Sheet1 Range A1:A4 will be transfered to Sheet2 Range A1:A4 and this
will be done after data is entered in Sheet1 Cell A4 so that all 4 cells are
full and after transfer of data, data in Shee1 Range A1:A4 will be cleared.
Your kind help will be greatly appreciated
Thank You
Best Regards
Albert
On the 15-01-2010 Micky was so kind to send me this macro which I found most
valuble. I tried to reach him again through the Q&A we started but it seems
we lost contact. Can anyone please help me adjust this macro to my specific
needs.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Application.EnableEvents = False
LR = Sheets("Sheet2").Cells(Rows.Count, 4).End(xlUp).Row
If IsEmpty(Sheets("Sheet2").Cells(1, 4)) Then
Target.Cut Sheets("Sheet2").Cells(LR, 4)
Else
Target.Cut Sheets("Sheet2").Cells(LR, 4).Offset(1)
End If
Application.EnableEvents = True
End If
End Sub
============
Micky
Can this macro be applied to a range of cells as
the 'Target Adress?
What I would like is that the data will be transfered to 'Sheet2' after the
complition of the last cell in the range of the 'Target Address'
Ex: Sheet1 Range A1:A4 will be transfered to Sheet2 Range A1:A4 and this
will be done after data is entered in Sheet1 Cell A4 so that all 4 cells are
full and after transfer of data, data in Shee1 Range A1:A4 will be cleared.
Your kind help will be greatly appreciated
Thank You
Best Regards
Albert