abenitez77
Board Regular
- Joined
- Dec 30, 2004
- Messages
- 149
Hello,
I am using this line to get the last row and column used:
It is working but I have a sheet where the last row is row 18488. The problem is that between that row and the next row up is row 98. Everything in between is empty. The last row (A1) (in row 18488) has a text "Please do not enter data beyond this row. The price entry limit is 20,000 rows." I want my last row to be row 98. How do I exclude the text in row 18488?
I am getting the last row so that I can use it as a range and then save it to an array so I can loop thru:
I am using this line to get the last row and column used:
Code:
Set lastRow = ws.Cells.SpecialCells(xlCellTypeLastCell).EntireRow
Set lastColumn = ws.Cells.SpecialCells(xlCellTypeLastCell).EntireColumn
I am getting the last row so that I can use it as a range and then save it to an array so I can loop thru:
Code:
Set lastRow = ws.Cells.SpecialCells(xlCellTypeLastCell).EntireRow
Set lastColumn = ws.Cells.SpecialCells(xlCellTypeLastCell).EntireColumn
Set rRange = Range(Cells(1, 1), Cells(LastRow, LastCol))
' Copy the Range to an Array
myarray2 = rRange
For r = 3 To UBound(myarray2)
Last edited: