ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find End of List (https://www.excelbanter.com/excel-programming/409827-find-end-list.html)

Joe Schmo

Find End of List
 
How do I find the cell address the end of a list. See list below. How to
find cell A5.

A1 Jim
A2 John
A3 Sally
A4 Sara
A5 Bill


James Snell

Find End of List
 
Range("A1").End(xlDown)


"Joe Schmo" wrote:

How do I find the cell address the end of a list. See list below. How to
find cell A5.

A1 Jim
A2 John
A3 Sally
A4 Sara
A5 Bill



Gary Keramidas

Find End of List
 
here are a couple different ways:

this will select the cell. it's not a good practice to select, but just used as
an illustration here.

range(worksheets("Sheet1").cells(rows.Count,"A").e nd(xlup).address).Select

or if you just want A5 returned:

lastcell = worksheets("Sheet1").cells(rows.Count,"A").end(xlu p).address(0,0)
--


Gary


"Joe Schmo" wrote in message
...
How do I find the cell address the end of a list. See list below. How to
find cell A5.

A1 Jim
A2 John
A3 Sally
A4 Sara
A5 Bill





All times are GMT +1. The time now is 03:21 AM.

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