ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use excel to insert data at the bottom of existing data (https://www.excelbanter.com/excel-programming/342186-use-excel-insert-data-bottom-existing-data.html)

Mike Lines

Use excel to insert data at the bottom of existing data
 
I have several csv files that i need to import into excel, one below the
other, on one worksheet. The length of the csv files vary, so i can't put an
absolute value in my macro. Is there a way to automatically position my
insertion point below the last row of data? The macro works great so far as
the length of my csv files don't vary. But they do.

Any ideas?

Thanks!

Tom Ogilvy

Use excel to insert data at the bottom of existing data
 
set rng = cells(rows.count,1).End(xlup)(2)

rng is a reference to the cell where you import the next file.

--
Regards,
Tom Ogilvy

"Mike Lines" <Mike wrote in message
...
I have several csv files that i need to import into excel, one below the
other, on one worksheet. The length of the csv files vary, so i can't put

an
absolute value in my macro. Is there a way to automatically position my
insertion point below the last row of data? The macro works great so far

as
the length of my csv files don't vary. But they do.

Any ideas?

Thanks!





All times are GMT +1. The time now is 05:06 PM.

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