ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Current Region (https://www.excelbanter.com/excel-programming/284364-copy-current-region.html)

Rohit Thomas[_2_]

Copy Current Region
 
Hello All,

I have used the following code to copy data from one
worksheet to another when I do not know the exact range
but always start at Range("A1"):
Range("A1").CurrentRegion.Copy

However, this does not work if one of the columns in
between the entire range has no data. How do I copy the
entire range if one or more columns in the range contains
no data?

mudraker[_52_]

Copy Current Region
 

try

UsedRange.Copy


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com