How to Lookup and Return a Unique Value

I have a spreadsheet which pulls in data from several queries.

Query 1 into RAW worksheet- User ID, User Name, Sign On Name, Application, Version, Function
Query 2 into Additional Data worksheet - ID, Name, Dept, Start Date, End Date, Last Logon, Password Change Freq, Password Change Date, Attempts, Company Status, Company

I then combine in a worksheet called User Analysis:

Company Name, User ID, User Name, Dept, Application, Version, Function Last Log On.
A VLOOKUP is used to find the Dept name using the User ID field.

The problem I am experiencing is VLOOKUP will not work to return Company and Last Log On as it will only find the first match and will then go no further.  I have tried INDEX and MATCH with the same result.

I would greatly appreciate any help.

I have attached an example of what I am trying to do.
Sonia BowditchInformation Security OfficerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saurabh Singh TeotiaCommented:
Workbook Missing..Can you attach your workbook please...
Sonia BowditchInformation Security OfficerAuthor Commented:
Apologies, workbook now attached.

Thanks.
VLOOK-ERR.xlsm
Saurabh Singh TeotiaCommented:
Assuming you want to find the last company where the user has login basis of id from additional data sheet in user analysis..then use this formula...

in A Column..

=LOOKUP(2,1/(('ADDITIONAL DATA'!$A$2:$A$73='User Analysis'!B2)),'ADDITIONAL DATA'!$K$2:$K$73)

Open in new window


In I Column...

=LOOKUP(2,1/(('ADDITIONAL DATA'!$A$2:$A$73='User Analysis'!B2)),'ADDITIONAL DATA'!$F$2:$F$73)

Open in new window


Simply drag this and this will give you the last instance of the user..

Saurabh...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Saurabh Singh TeotiaCommented:
Enclosed is your workbook for your reference...

Saurabh..
VLOOK-ERR.xlsm
Sonia BowditchInformation Security OfficerAuthor Commented:
Thank you for such a quick response and a great answer.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.