How to copy and paste based on quantity?
Closed
Jo
-
Dec 3, 2011 at 11:05 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Dec 3, 2011 at 08:04 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Dec 3, 2011 at 08:04 PM
Related:
- How to copy and paste based on quantity?
- Instagram account based in wrong country - Instagram Forum
- Based on the values in cells b77 b88 ✓ - Excel Forum
- How to copy paste youtube link on android - Guide
- Name Values - Excel Forum
- This message was deleted text copy and paste - Android Forum
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Dec 3, 2011 at 08:04 PM
Dec 3, 2011 at 08:04 PM
try this macro (note: row1 contain headers and data only from row no. 2)
Sub test() Dim rc As Range, c As Range, dest As Range, j As Long With Worksheets("sheet1") Set rc = Range(.Range("c2"), .Range("C2").End(xlDown)) For Each c In rc j = c.Value c.EntireRow.Copy With Worksheets("sheet2") Set dest = .Cells(Rows.Count, "A").End(xlUp).Offset(1, 0) Range(dest, dest.Offset(2, 0)).PasteSpecial End With Next c End With With Worksheets("sheet2") Range(.Range("C2"), .Range("C2").End(xlDown)).FormulaArray = 1 End With End Sub