How can I find the last row that contains data in a specific column and on a specific sheet?
相关问题
- Excel sunburst chart: Some labels missing
- Error handling only works once
- Error handling only works once
- Excel formula in VBA code
- Excel VBA run time error 450 from referencing a ra
相关文章
- Get column data by Column name and sheet name
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
- Declare a Range relative to the Active Cell with V
- What's the easiest way to create an Excel tabl
How about:
Re Comment
This
Will return the row number of the last cell even when only a single cell in the last row has data.
First function moves the cursor to the last non-empty row in the column. Second Function prints that columns row.
Here's a solution for finding the last row, last column, or last cell. It addresses the A1 R1C1 Reference Style dilemma for the column it finds. Wish I could give credit, but can't find/remember where I got it from, so "Thanks!" to whoever it was that posted the original code somewhere out there.
Usage:
?lastdata(activecell.EntireColumn).Address
Usage:
This is look for value in column A because of "A65536"