Sounds to me like a problem that should be analyzed with a database
and not a spreadsheet. Are you familiar with SQL, or at least with
Access?
You need to have unique identifiers. One way of doing it is to insert
a new column A in Tab2 and put this formula in A2:
=IF(B2="","",B2&"_"&COUNTIF(B$2:B2,B2))
Copy this down and you will get:
Ref Name Age
John_1 John 23
Mark_1 Mark 22
Luke_1 Luke 26
Luke_2 Luke 27
Then your lookup formula becomes:
=VLOOKUP(A2&"_"&COUNTIF(A$2:A2,A2),Tab2!$A$2:$B$5,2,0)
copy this down as required.
Hope this helps.
Pete
On Mar 4, 6:14 pm, ciaran.hud...@gmail.com wrote:
> I've a problem that a standard vlookup will not solve for me as it
> always returns the first value it finds.
[quoted text clipped - 37 lines]
> Regards,
> Ciarán
Pete_UK - 05 Mar 2008 00:46 GMT
Sorry, you need to take account of the extra column - the formula
would be:
=VLOOKUP(A2&"_"&COUNTIF(A$2:A2,A2),Tab2!$A$2:$C$5,3,0)
Hope this helps.
Pete
> You need to have unique identifiers. One way of doing it is to insert
> a new column A in Tab2 and put this formula in A2:
[quoted text clipped - 64 lines]
>
> - Show quoted text -