Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

vlookup with if or where clause

Avatar of farmingtonis
farmingtonis asked on
Microsoft ExcelSpreadsheets
5 Comments1 Solution1585 ViewsLast Modified:
I have a vlookup that I am trying to make it a little more functional:


This pulls back some of the data that i need.  

However, i want it to be more exact.  I need it to only pull back the data if the data in another column in sheet IP contains the word 'last'

so basically i need something like this:

The table example is below.  Of course, with my simple code about I just pull back a 1 every time ColumnA has a 2.  However, I only want to pull back the match where the first match happens.

2                       1
2                       1,2
2                       1,2,3
2                       1,2,3,4            Last   <-------i just want this one to populate when there is a 2 in my vlookup formula
3                       a
3                       a,b
3                       a,b,c                Last   <-------i just want this one to populate when there is a 3 in my vlookup formula

Avatar of Glenn Ray
Glenn RayFlag of United States of America imageUS Data Team Lead
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answers