ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simply select rows (https://www.excelbanter.com/excel-programming/309376-simply-select-rows.html)

JP[_11_]

Simply select rows
 
I have been trying to simply select rows starting from the first row and
ending at the cursor's row.
For example, instead of ending the selection at row 13, as in:

Rows("1:13").Select

I would need:

Rows("1:[put something here that ends the selection at whatever row the
cursor is on]").Select

I've tried various configurations to no avail.
Thank you,
JP



...Patrick[_5_]

Simply select rows
 
last = range("A65000").end (xlup).row
rows("1:" & last).select


--
....Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel



"JP" a écrit dans le message de
. ..
I have been trying to simply select rows starting from the first row and
ending at the cursor's row.
For example, instead of ending the selection at row 13, as in:

Rows("1:13").Select

I would need:

Rows("1:[put something here that ends the selection at whatever row the
cursor is on]").Select

I've tried various configurations to no avail.
Thank you,
JP





Alan Beban[_2_]

Simply select rows
 
JP wrote:
I have been trying to simply select rows starting from the first row and
ending at the cursor's row.
For example, instead of ending the selection at row 13, as in:

Rows("1:13").Select

I would need:

Rows("1:[put something here that ends the selection at whatever row the
cursor is on]").Select

I've tried various configurations to no avail.
Thank you,
JP


Rows("1:" & ActiveCell.Row).Select

Alan Beban

JP[_11_]

Simply select rows
 
Thank you, Patrick.
Best Regards,
JP

"...Patrick" <http://cerbermail.com/?KPW0tTCjFw wrote in message
...
last = range("A65000").end (xlup).row
rows("1:" & last).select


--
...Patrick
Quoi que vous fassiez, faites le bien .
Mail: http://cerbermail.com/?KPW0tTCjFw
Connectez vous sur ce forum par :
news://msnews.microsoft.com/microsoft.public.fr.excel



"JP" a écrit dans le message de
. ..
I have been trying to simply select rows starting from the first row and
ending at the cursor's row.
For example, instead of ending the selection at row 13, as in:

Rows("1:13").Select

I would need:

Rows("1:[put something here that ends the selection at whatever row the
cursor is on]").Select

I've tried various configurations to no avail.
Thank you,
JP








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

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