Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-24-2021, 10:03 AM
gibra's Avatar
gibra gibra is offline How To Copy/Paste Partial Row Windows 10 How To Copy/Paste Partial Row Office 2019
Novice
 
Join Date: Mar 2021
Posts: 8
gibra is on a distinguished road
Default

You must always indicate the sheet you intend to work on.
This instruction, does NOT select the range as you think, because it reads the active sheet which is not TCU but is Sheet1.
Code:
For Each c In Range("F15:F" & Cells(Rows.Count, 6).End(xlUp).Row)
so you should be write:
Code:
For Each c In ws.Range("F15:F" & Cells(ws.Rows.Count, 6).End(xlUp).Row)
and so on...
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
cut/copy and paste won't paste DennisWG Word 1 03-13-2020 12:36 PM
VBA copy/paste Urraco Excel Programming 3 05-14-2018 03:59 AM
How To Copy/Paste Partial Row When I copy&paste a second copy appears that can't be edited makeo22 Word 3 04-26-2017 07:09 PM
How To Copy/Paste Partial Row Copy n Paste seimeinokigen Excel 2 04-16-2016 09:31 AM
How To Copy/Paste Partial Row Paste Special: Copy and Paste Formatting Only? tinfanide Word 6 03-06-2013 12:21 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:54 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