ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I use the Shift+Ctrl+down feature in a macro (https://www.excelbanter.com/excel-programming/397433-how-do-i-use-shift-ctrl-down-feature-macro.html)

dswensen

How do I use the Shift+Ctrl+down feature in a macro
 
I need to use a macro for new spreadsheets on a daily basis. I want to use
Shift+Ctrl+down arrow to copy down to the last record and each spreadsheet
has a different number of records. It works fine for the first spreadsheet
which had 571 rows but when I use it on another it only goes down to row 571
no matter how many rows are in the spreadsheet. Any ideas?


Kevin B

How do I use the Shift+Ctrl+down feature in a macro
 
Assuming that the cell point is at the starting cell the code would be:

Range(Selection, Selection.End(xlDown)).Select

You could have recorded this little snippet too.
--
Kevin Backmann


"dswensen" wrote:

I need to use a macro for new spreadsheets on a daily basis. I want to use
Shift+Ctrl+down arrow to copy down to the last record and each spreadsheet
has a different number of records. It works fine for the first spreadsheet
which had 571 rows but when I use it on another it only goes down to row 571
no matter how many rows are in the spreadsheet. Any ideas?


Jim Thomlinson

How do I use the Shift+Ctrl+down feature in a macro
 
Post your code. We can give you some general answers but it would be better
if we could see your code...
--
HTH...

Jim Thomlinson


"dswensen" wrote:

I need to use a macro for new spreadsheets on a daily basis. I want to use
Shift+Ctrl+down arrow to copy down to the last record and each spreadsheet
has a different number of records. It works fine for the first spreadsheet
which had 571 rows but when I use it on another it only goes down to row 571
no matter how many rows are in the spreadsheet. Any ideas?


JLGWhiz

How do I use the Shift+Ctrl+down feature in a macro
 
You are also assuming there are no blank cells anywhere in that column before
the last entry. But you are correct that it would be the equivalent command.

"Kevin B" wrote:

Assuming that the cell point is at the starting cell the code would be:

Range(Selection, Selection.End(xlDown)).Select

You could have recorded this little snippet too.
--
Kevin Backmann


"dswensen" wrote:

I need to use a macro for new spreadsheets on a daily basis. I want to use
Shift+Ctrl+down arrow to copy down to the last record and each spreadsheet
has a different number of records. It works fine for the first spreadsheet
which had 571 rows but when I use it on another it only goes down to row 571
no matter how many rows are in the spreadsheet. Any ideas?



All times are GMT +1. The time now is 10:56 PM.

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