so was ?
Sub Test()
Dim lastCol As Long, nextCol As Long
Dim ac As Range, ec As Range, nc As Range
'über die Spalte
lastCol = 1
On Error Resume Next
lastCol = Cells.Find("*", [a1], , , xlByColumns, xlPrevious).Column
On Error GoTo 0
nextCol = Cells.Find("*", [a1], , , xlByColumns, xlPrevious).Column + 2
'über Range
Set ac = Range("A1") 'beliebig
Set ec = Cells(ac.Row, Columns.Count).End(xlToLeft) 'Bezug auf ac !
Set nc = ec.Offset(0, 2)
Debug.Print lastCol, nextCol
Debug.Print ec.Address, nc.Address
End Sub
|