I have a workbook with several sheets, each one has information about a different product. And the 1st sheet is a summary with only part of the data. What happens currently is that after filling data in the product sheet, someone has to manually copy the relevant info and paste it in the summary sheet. So I'm trying to write a macro, so the person selects the recently added rows, presses a button, and the macro copies it to the 1st sheet. However, I don't want to copy all columns. I want to grab all the selected rows, but only columns A,B,E,F,G. This is what I have so far.
Set range1 = Selection.Resize(,2)
range1.Copy
With Sheets("Summary").Range("A" & Rows.Count).End(xlUp).Offset(1)
.PasteSpecial(xlPasteAll)
.PasteSpecial(xlPasteValues)
End With
This works successfully for copying columns A,B. Now I'm struggling to copy the other 3. I have been playing with Range, Resize, Union. I know my answer lies somewhere around there. But since I'm not familiar with VBA, I'm hoping someone can help me fast forward the process a bit.
Thanks!