I am trying to figure out how to do a macro that will copy data from one sheet titled Master Sheet onto another sheet titled 2015November but only when an 2015November is found in column k on the Master Sheet. If 2015November is found in column K, then I need all data in cells C, H and J (on that row) to be copied onto the Sheet 2015November into corresponding columns A,B, AND C. I have to duplicate this code a few times. so that it corresponds to the month of sales to create a pipeline of estimated sales for the month.
I've been watching Youtube videos and have tried but can't figure it out.
I need it to find the next blank row to insert it into and I need it to not duplicate any data. Any help would be appreciated! I am using Excel 2011
this is code I've been using
Sub copycolumns()
Dim lastrow As Long, erow as long
Lastrow=sheet1.cells(rows.count,1).end(xlUp).Row
for i=4 to lastrow
Sheet1.Cells(i,1).Copy
erow=sheet2.Cells(Rows.Count,1).end(xlUp).Offset(1,0).Row
sheet1.Paste Destination=Worksheets(“Sheet2”).Cells(erow,1)
sheet1.Cells(i,3).Copy
sheet1.Paste Destination=Worksheets(“Sheet2”).Cells(erow,2)
sheet1.Cells(i,8).Copy
sheet1.Paste Destination=Worksheets(“Sheet2”).Cells(erow,3)
sheet1.Cells(i,10).Copy
sheet1.Paste Destination=Worksheets(“Sheet2”).Cells(erow,4)
Next i
application.CutCopyMode = False
sheet2.columns().Autofit
Range(“A1”).Select

