VLOOKUP()返回第一个非空值或非0值

我正在使用VLOOKUP()来返回值,但是遇到了第一个值可能为NULL0

我怎样才能使用这个函数(或类似的)返回第一个NON Null或0值?

 Application.WorksheetFunction.VLookup(filterCon, Sheets("Ace Up Sleeve").Range("A:P"), 11, False) 

我将使用AGGREGATE工作表函数在工作表上完成此工作。 考虑到VBA,你可以在同一个公式上使用Application.Evaluate(...)

 Dim filterCon As String, fr As Variant, lr As Long, vreturn As Variant filterCon = "findthis" With Worksheets("Ace Up Sleeve") lr = .Cells(.Rows.Count, "A").End(xlUp).Row fr = Application.Evaluate("aggregate(15, 6, row(1:" & lr & ")/('Ace Up Sleeve'!K1:K" & lr & "<>0), 1)") If Not IsError(fr) Then vreturn = .Cells(fr, "K").Value Debug.Print vreturn End If End With