Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2017, 09:57 AM
dangelor dangelor is offline copy a row and paste the row into another sheet more then one time:macro Windows 7 64bit copy a row and paste the row into another sheet more then one time:macro Office 2016
Novice
 
Join Date: Apr 2017
Posts: 1
dangelor is on a distinguished road
Default

Possibly...
Code:
Sub Not_Tested()
    Dim rg               As Range
    Dim rC               As Range
    Dim a                As Integer
    
    'Change the names of the worksheets to match
    'Change "Some Specific Value" to ???

    With Worksheets(1)
        Set rC = Intersect(.Columns("C"), .UsedRange)
    End With
    For Each rg In rC
        If rg.Value = "Some Specific Value" Then
            For a = 1 To 3
                rg.EntireRow.Copy Worksheets(2).Cells(1048576, 1).End(xlUp).Offset(1)
            Next a
        Else
            rg.EntireRow.Copy Worksheets(3).Cells(1048576, 1).End(xlUp).Offset(1)
        End If
    Next rg
End Sub

Reply With Quote
Reply

Tags
copy/paste rows



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy a row and paste the row into another sheet more then one time:macro How to copy excel sheet withe HEADER and Paste into new sheet? cloudforgiven Excel Programming 6 01-05-2017 07:30 PM
Trying to find a macro that will copy a cell and paste that value to a specific sheet bryans88 Excel Programming 1 12-23-2015 01:40 PM
copy checkbox string and paste it in excel sheet MOHAMMEDSALMAN Excel Programming 7 10-29-2015 03:50 AM
Want to change Macro to copy and paste data to new sheet Vortex69 Excel Programming 0 12-23-2014 09:53 PM
copy cell from sheet 2 to sheet 3 macro slipperyjim Excel Programming 1 02-18-2010 01:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft