Это один вопрос, с которым я действительно смущен. Coz Я искал это столько раз, но всегда нашел коды, связанные с поиском последней использованной или первой не пустой ячейки. Пробовали по кодам ниже. Дифференциальные коды были разделены словом "четный"
iRow = Worksheets("Sheet1").Cells(Rows.Count,1).End(XlUp).Row
даже
Sub LastCellBeforeBlankInColumn()
Range("A1").End(xldown).Select
End Sub
даже
Найдите самую последнюю использованную ячейку в столбце:
Sub LastCellInColumn()
Range("A65536").End(xlup).Select
End Sub
даже
Найти последнюю ячейку перед пробелом в строке:
Sub LastCellBeforeBlankInRow()
Range("A1").End(xlToRight).Select
End Sub
даже
Найдите самую последнюю использованную ячейку в строке:
Sub LastCellInRow()
Range("IV1").End(xlToLeft).Select
End Sub
даже
Worksheets("Sheet1").Range("A1").End(xlDown).Row + 1
даже
LastRow = Range("A" & Rows.Count).End(xlUp).Row + 1
Sheets("SheetName").Range("A" & LastRow).Paste
даже
Dim FirstBlankCell as Range
Set FirstBlankCell=Range("A" & rows.Count).end(xlup).offset(1,0)
FirstBlankCell.Activate
'Find the last used row in a Column: column A in this example
Dim LastRow As Long
Dim NextRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "F").End(xlUp).Row
End With
NextRow = LastRow + 1