ich bekomme die Formel
=VERWEIS(2;1/(A:A"");ZEILE(A:A))
nicht in die Form
a = Application.WorksheetFunktion.Lookup(...
umgeschrieben.
Würde mir da bitte jemand helfen...
Peter
Sub Makro4()
ActiveCell.FormulaR1C1 = "=LOOKUP(2,1/(C[-1]""""),ROW(C[-1]))"
End Sub
Nun die Übertragung an WorksheetFunktion:Sub Test()
Dim a%
With Application.WorksheetFunction
a = .LOOKUP(2,1/(C[-1]""""),ROW(C[-1]))
End With
End Sub
Das funktioniert leider nicht "Syntax Fehler beim kompilieren"Sub Makro1()
Dim a
a = Application.Evaluate("=LOOKUP(2,1/(C[1]""""),ROW(C[1]))")
End Sub
Sub Test()
Dim a
Dim myRng As Range: Set myRng = Worksheets(1).Range("A:A")
With Application.WorksheetFunction
a = ".LOOKUP(2,1/" & myRng & """""),ROW(" & myRng & "))"
End With
End Sub