Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-20-2024, 09:32 AM
NoSparks NoSparks is offline Copy/Paste Range Values To Other Sheet Windows 10 Copy/Paste Range Values To Other Sheet Office 2010
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

try this and move Next term down below it
Code:
'*******************************************************************
'Code from here down to next line of asterisks

    For Each cell In wsSource.Range("B2:B" & lastRow)
       If cell.Value = "" Then
          Exit For
       Else
          If cell.Offset(, 2) = wsDest.Name Then
            Sheets(cell.Value).UsedRange.Copy
            wsDest.Range("A" & wsDest.UsedRange.Rows.Count + 2).PasteSpecial Paste:=xlPasteValues
          End If
       End If
    Next cell

'Code from here up to next line of asterisks
 '*******************************************************************
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Code to copy data from two sheet ,paste into corresponding sheet through cmdbutton jackfruit88 Excel Programming 1 07-08-2022 09:27 PM
Copy/Paste Range Values To Other Sheet Copy Excel Range and Paste in PowerPoint Shapes leops PowerPoint 4 08-31-2017 06:47 AM
Copy/Paste Range Values To Other Sheet How to copy excel sheet withe HEADER and Paste into new sheet? cloudforgiven Excel Programming 6 01-05-2017 07:30 PM
VBA macro to copy range and paste in next blank row tune2grow Excel Programming 0 09-03-2014 08:25 PM
Word - Calculate and paste values from Excel sheet Augf87 Word 1 07-06-2009 10:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:52 AM.


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