Hello,
The question is as stated in the title.
I have data on the current Sheet and I want to write on the first empty row after
The rows that contain the data.
Note: Column A may be empty and Column B may contain data
I want to write the data after the last row containing data, whether in column A or B or or C...etc
This is the last result I reached, but the problem this code is select the entire row and I only want to select the first cell in the row to write on
The question is as stated in the title.
I have data on the current Sheet and I want to write on the first empty row after
The rows that contain the data.
Note: Column A may be empty and Column B may contain data
I want to write the data after the last row containing data, whether in column A or B or or C...etc
This is the last result I reached, but the problem this code is select the entire row and I only want to select the first cell in the row to write on
VBA Code:
Sub Range_Find_Method()
'Finds the last non-blank cell on a sheet/range.
Dim lRow As Long
Dim lCol As Long
lRow = Cells.Find(What:="*", _
After:=Range("A1"), _
LookAt:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
Rows(lRow).Select
MsgBox "Last Row: " & lRow
End Sub