MsgBox (" he said " + """sentence""")
A few methods to get the row/column
Sub LastRows_Columns()
Dim lLR As Long
Dim iLC As Integer
'find row before next blank cell in column A
lLR = Range("A1").End(xlDown).Row
'find last used row in column A
lLR = Cells(Rows.Count, "a").End(xlUp).Row
'find last used row on sheet
lLR = Cells.Find(what:="*", SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row
lLR = Range("A1").SpecialCells(xlCellTypeLastCell).Row
'find column before next blank cell in row 1
iLC = Range("A1").End(xlToRight).Column
'find last used column in row 1
iLC = Cells(1, Columns.Count).End(xlToLeft).Column
'find last used column on sheet
iLC = Cells.Find(what:="*", SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious).Column
iLC = Range("A1").SpecialCells(xlCellTypeLastCell).Column
'set variable to last used cell
Dim rLC As Range
Set rLC = ActiveSheet.UsedRange
Set rLC = ActiveCell.SpecialCells(xlLastCell)
End Sub
Bookmarks