![]() Show the final output in an Excel Message box. LastCell = ActiveSheet.Range("A1").SpecialCells(xlCellTypeLastCell).AddressĬoncatenate all three variables (LastRow/LastCol/LastCell), add a new line between variables use Chr(10). LastCol = ActiveSheet.Range("A1").SpecialCells(xlCellTypeLastCell).Column LastRow = ActiveSheet.Range("A1").SpecialCells(xlCellTypeLastCell).Row ![]() Use SpecialCells function to find last used row/column/cell 'Find Last Used Row ActiveSheet.Range(“A1”).SpecialCells(xlCellTypeLastCell).Addressĭim LastRow As Long, LastCol As Long, LastCell As String Syntax: expression.SpecialCells (Type, Value)Įg: To return the last used cell address in an activesheet. #Find a range in excel vba how to
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |