Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Cells Find

Public Sub GetRealLastCell()   Dim realastRow As Long   Dim realastColumn As Long   Range("A1").Select     On Error Resume Next   realastRow = Cells.Find("*", Range("A1"),xlFormulas, , xlByRows, xlPrevious).Row   realastColumn = Cells.Find("*", Range("A1"), xlFormulas, , xlByColumns, xlPrevious).Column   Cells(realastRow, realastColumn).Select End Sub