Hello friends,
How to get correct value using vlookup formula in duplicate look up values.
Here i mentioned a eg;
VlookUp_DuplicateValue.JPG
Hello friends,
How to get correct value using vlookup formula in duplicate look up values.
Here i mentioned a eg;
VlookUp_DuplicateValue.JPG
Hi,
To ensure a better response please upload workbooks not pictures - see guidance in the rules area of the forum. People are reluctant to recreate your workbook when you already have a copy.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star iconbelow the post.
Hi
Please find my attached file.
VlookUp_DuplicateValue.xlsx
Try this array formula** entered in F2 and copied down:
=INDEX(B:B,SMALL(IF(A$2:A$10=D3,ROW(A$2:A$10)),COUNTIF(D$3:D3,D3)))
** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
Biff
Microsoft MVP Excel
Keep It Simple Stupid
Let's Go Pens. We Want The Cup.
use VlookupNth:with the formula:![]()
Function VLOOKUPNTH(lookup_value, table_array As Range, _ col_index_num As Integer, nth_value) ' Extension to VLOOKUP function. Allows for finding ' the "nth" item that matches the lookup value. Dim nRow As Long Dim nVal As Integer Dim bFound As Boolean VLOOKUPNTH = "Not Found" With table_array For nRow = 1 To .Rows.Count If .Cells(nRow, 1).Value = lookup_value Then nVal = nVal + 1 End If If nVal = nth_value Then VLOOKUPNTH = .Cells(nRow, col_index_num).Text Exit Function End If Next nRow End With End Function
Formula:
=VlookupNth(D3,$A$2:$B$10,2,COUNTIF($D$3:D3,D3))
![]()
Sub Reputation() Dim Problem as Variant Dim Reputation as Integer For Each Problem in Forum.Threads If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1 Next Problem End Sub
Please see attached spreadsheet with an array formula
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Thank you for your feedback!![]()
Hi Leon V (AW) ,Tony Valko & AlKey
Thanks for your reply and time spend my question.
Work perfect.
You're welcome. Thanks for the feedback!
If your question has been solved please mark the thread as being solved.
In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks