![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
How do I find the last used cell in a column?
Each day a new cell is used in the column so the column gets longer.I want to use the info that is contained in the last used cell. |
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Try
Range("A65536").End (xlUp) |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 76
|
counta(A:A)
|
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
|
|
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
|
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Posts: 76
|
that is true...
|
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
=COUNTIF(A:A,"<>""")
will return the last used cell on that sheet, BUT, THIS IS NOT RELIABLE. So, go with Dave's solution, VBA is the only "reliable" way of knowing. |
|
|
|
|
|
#8 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
=INDEX(A:A,MATCH(9.99999999999999E+307,A:A) ...works quite nicely for numeric data. My inquiry as to the nature of the data has yet to be answered. [ This Message was edited by: Mark W. on 2002-03-11 16:29 ] |
|
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
I know Mark... Match works GREAT for numeric data, but, we've seen more than once that THAT column doesn't have numbers...
Oh, anyway... |
|
|
|
|
|
#10 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
Consider this for determining the extent of a column of typical text values... =MATCH(REPT("z",255),A:A) This can be refined if a key field of a data list is fixed length (or its maximum length is known) such as an account number. So for an 8-character account number you'd use.... =MATCH(REPT("z",8),A:A) |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|