ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro help! (https://www.excelbanter.com/excel-worksheet-functions/44399-macro-help.html)

Robbo

Macro help!
 
I'm trying to write a macro that inserts a line of data from one part of the
sheet, to the bottom of a list. Is there a function for this?

There could potentially be over 1000 rows in the list, so I don't really
want to go down the 'IF' route!

Thanks

Pallet1210A

if the list is contiguous, i.e. there are no breaks in the data or you can
identify a column with no spaces (nulls) in, you can quickly get to the
bottom using the selection.end command, move down one more line and paste the
data. Then return to your original data (trap the address of a cell in the
row using MyReturnCell = activecell.address before you go to the end of the
list then use range(MyReturnCell).select) and delete that row.

"Robbo" wrote:

I'm trying to write a macro that inserts a line of data from one part of the
sheet, to the bottom of a list. Is there a function for this?

There could potentially be over 1000 rows in the list, so I don't really
want to go down the 'IF' route!

Thanks


Robbo

Thanks I'll try that.... How do I tell it to select the row underneath the end?

"Pallet1210A" wrote:

if the list is contiguous, i.e. there are no breaks in the data or you can
identify a column with no spaces (nulls) in, you can quickly get to the
bottom using the selection.end command, move down one more line and paste the
data. Then return to your original data (trap the address of a cell in the
row using MyReturnCell = activecell.address before you go to the end of the
list then use range(MyReturnCell).select) and delete that row.

"Robbo" wrote:

I'm trying to write a macro that inserts a line of data from one part of the
sheet, to the bottom of a list. Is there a function for this?

There could potentially be over 1000 rows in the list, so I don't really
want to go down the 'IF' route!

Thanks



All times are GMT +1. The time now is 07:45 AM.

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