ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   XlDown: Go to next blank row (https://www.excelbanter.com/excel-programming/337449-xldown-go-next-blank-row.html)

tomwashere2

XlDown: Go to next blank row
 
Can anyone tell me what would be the best method to use if I intend to use a
program that copies data from various worksheets and pastes the data to one
worksheet?

The data is copied and pasted consecutively based on a date range such as
(08/01/05 thru 08/10/05) etc. from different workbooks. Each workbook has
data specific to the date.

Currently:
The problem that I have is that I am using a macro that uses: 'XlDown' to
paste the data. This is because there is already existing data in the
worksheet... and I intend to paste the data to the next blank row.

What happens with XlDown is that it only takes me to the last row with
data... but I need to go to the next blank row so that I can paste the new
info.

Trevor Shuttleworth

XlDown: Go to next blank row
 
..End(xlDown).Offset(1,0)

Regards

Trevor


"tomwashere2" wrote in message
...
Can anyone tell me what would be the best method to use if I intend to use
a
program that copies data from various worksheets and pastes the data to
one
worksheet?

The data is copied and pasted consecutively based on a date range such as
(08/01/05 thru 08/10/05) etc. from different workbooks. Each workbook has
data specific to the date.

Currently:
The problem that I have is that I am using a macro that uses: 'XlDown' to
paste the data. This is because there is already existing data in the
worksheet... and I intend to paste the data to the next blank row.

What happens with XlDown is that it only takes me to the last row with
data... but I need to go to the next blank row so that I can paste the new
info.




Jim Thomlinson[_4_]

XlDown: Go to next blank row
 
You are better to use xlUp something like this

dim rng as range

set rng = sheets("Sheet1").Range("A65536").end(xlUp).offset( 1,0)

You can paste right to the range something like

Sheets("Sheet2").Range("5:10").copy Destination :=rng
--
HTH...

Jim Thomlinson


"tomwashere2" wrote:

Can anyone tell me what would be the best method to use if I intend to use a
program that copies data from various worksheets and pastes the data to one
worksheet?

The data is copied and pasted consecutively based on a date range such as
(08/01/05 thru 08/10/05) etc. from different workbooks. Each workbook has
data specific to the date.

Currently:
The problem that I have is that I am using a macro that uses: 'XlDown' to
paste the data. This is because there is already existing data in the
worksheet... and I intend to paste the data to the next blank row.

What happens with XlDown is that it only takes me to the last row with
data... but I need to go to the next blank row so that I can paste the new
info.



All times are GMT +1. The time now is 02:31 PM.

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