Function findZeile(wsSuchTbl As WorkSheet, datDatum As Date) As Long
Dim i As Long
For i = 1 To wsSuchTbl.Cells.SpecialCells(xlCellTypeLastCell).Row
If CDate(wsSuchTbl.Cells(i, 1).Value) = datDatum Then
Set findZeile = i
Exit Function
End If
Next i
End Function
Sub Kopieren()
Dim position As Long
position = findZeile(vorlage, Date)
vorlage.Cells(position, 2).Value = kunde.Cells(16,9).Value
End Sub
Die Zeile Set findZeile = i wird dabei markiert.
Was mach ich denn falsch.
Hab so gut wie keine Ahnung von VBA, bitte um Nachsicht.