How would you manually determine which cheque number you require to be the result? Once we know some other criteria we may be able to help.
Cheers
Rob H
Function dlookup(x, sr, tr, nr)
nm = WorksheetFunction.CountIf(nr, x)
If nm = 0 Then dlookup = tr.Cells(WorksheetFunction.Match(x, sr, 0), 1): Exit Function
nx = 0
For i = 1 To sr.Rows.Count
If sr.Cells(i, 1) = x Then nx = nx + 1
If nx = nm + 1 Then Exit For
Next i
If nx = nm + 1 Then dlookup = tr.Cells(i, 1): Exit Function
End Function
Title | # Comments | Views | Activity |
---|---|---|---|
Excel- VBA help on macros that size columns and rows | 7 | 21 | |
VLOOKUP Function MS Excel 2010 | 2 | 22 | |
Multiple Userforms from a previously working Template | 29 | 33 | |
Populate data based on a criteria | 2 | 18 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
11 Experts available now in Live!