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?
 - How to copy paste youtube link on android - Guide
 - Based on the values in cells b77 ✓ - Excel Forum
 - Instagram account based in wrong country - Instagram Forum
 - Based on the values in cells b77 b88 - Excel Forum
 - You cant paste this here because the copy area and paste area aren't the same size - Excel 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