ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   myRow = Cells(Rows.Count, 2).End(xlUp).Row (https://www.excelbanter.com/excel-programming/391595-myrow-%3D-cells-rows-count-2-end-xlup-row.html)

Dave F[_2_]

myRow = Cells(Rows.Count, 2).End(xlUp).Row
 
Can someone explain to me what this piece of code is supposed to do?

myRow = Cells(Rows.Count, 2).End(xlUp).Row


Keith74

myRow = Cells(Rows.Count, 2).End(xlUp).Row
 
seems to return the last row in column 2 that contains data



Tom Ogilvy

myRow = Cells(Rows.Count, 2).End(xlUp).Row
 
find the last row in column 2 that has data.

goto B65536. Then hit the end key and then the up arrow.

that is what it essentially does.

--
Regards,
Tom Ogilvy


"Dave F" wrote:

Can someone explain to me what this piece of code is supposed to do?

myRow = Cells(Rows.Count, 2).End(xlUp).Row



steve_doc

myRow = Cells(Rows.Count, 2).End(xlUp).Row
 
returns the row after the last "used" row - <possibly worded incorrectly

"Dave F" wrote:

Can someone explain to me what this piece of code is supposed to do?

myRow = Cells(Rows.Count, 2).End(xlUp).Row



Dave F[_2_]

myRow = Cells(Rows.Count, 2).End(xlUp).Row
 
Thanks all; this is helpful.

On Jun 19, 9:13 am, Tom Ogilvy
wrote:
find the last row in column 2 that has data.

goto B65536. Then hit the end key and then the up arrow.

that is what it essentially does.

--
Regards,
Tom Ogilvy



"Dave F" wrote:
Can someone explain to me what this piece of code is supposed to do?


myRow = Cells(Rows.Count, 2).End(xlUp).Row- Hide quoted text -


- Show quoted text -





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

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