• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy a range when cell changes+paste in last empty cell (repeat with range)

Hi,

As soon as data entered in cell("A2"), macro to copy range("A2:C2") and paste it in Sheet!Calendar.range(lastEmptyCell). For the next action, cell("A3") would copy range against it ("A3:C3").

Please see the attached sheet. Can anyone write a code snippet & help. Much appreciated

Thanks,
Karthik
 

Attachments

Hope!
You are looking something like this!!!

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim copyPaste As Range
Dim ws As Worksheet

Application.ScreenUpdating = False
If Intersect(Target, Range("A1:A10")) Is Nothing Or Target.Cells.Count > 1 Then Exit Sub

Set ws = Sheets("Calendar")
Set copyPaste = ws.Range("A" & Rows.Count).End(xlUp)(2)

Target.Resize(1, 3).copy copyPaste

Application.ScreenUpdating = True

End Sub
 
Back
Top