Vlookup Alternatives to Different Criteria

KuraiChikara

Board Regular
Joined
Nov 16, 2016
Messages
111
Office Version
  1. 2013
Platform
  1. Windows
Hello,
My issue is that I will have similar pieces of lookup values with minor differences I might want to find.
Vlookups work fine for what I need done, however, I don't like changing values to find the minor differences. I personally don't like it and if there is enough of them, it looks messy.

Example: The headers in the columns below are sequential with Excel; Columns A (name), B (Day), C (Item), D (Lookup Value), E (Vlookup Formula).
As you see, the name is the same, but day and item are different.
The formula at the end of it will pull the first entry of "Apple" while looking at the value "John" and without a unique variable I can't get it to pull "Apple" then "Pear."

My question is, is there a way to use a Vlookup, to pull data from a value that might be duplicated without making ugly variable differences like "John, John 1, John 2" etc?


NameDayItemLookup ValueVlookup Formula
JohnMondayApplesJohn=VLOOKUP(D2,$A$1:$C$3,3,FALSE)
JohnTuesdayPears=VLOOKUP(D2,$A$1:$C$3,3,FALSE)


To dive further into the rabbit hole, I know an index match can pull different data from identical values.

Example:
Sheet 1 has the value information as seen below.
Sheet 2 will have the following formulas:

1: Name Formula: =IFERROR(INDEX(Sheet1!$A$2:$A$5,MATCH(0,INDEX(COUNTIF(A$1:A1,Sheet1!$A$2:$A$5),0),0)),"")
2: Item 1 Formula: =IFERROR(INDEX(Sheet1!$B$2:$B$5,AGGREGATE(15,6,(ROW(Sheet1!$B$2:$B$5)-ROW(Sheet1!$B$2)+1)/(Sheet1!$A$2:$A$5=$A2),COLUMNS($A2:A2))),"")
3: Items 2-4 formula just drag Item 1 formula over.

I can get this complicated mess to work, but can't figure it out with Vlookups.
I personally don't think there is a way to do it without making a unique variable if the value is identical. But I thought I'd ask.

SHEET 2: Headers are there, second line of data is the formulas mentioned above which pulls the values you see
NameItem 1Item 2Item 3Item 4
JohnApplesPearsStrawberriesPineapples


SHEET 1 VALUE DATA
NameItem
JohnApples
JohnPears
JohnStrawberries
JohnPineapples
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

KuraiChikara

Board Regular
Joined
Nov 16, 2016
Messages
111
Office Version
  1. 2013
Platform
  1. Windows
Just closing this out, I used my INDEX process explained above to fix my issue. It's a decent sized formula and could cause sheet size issues but it works. I can reference multiple identical values and pull different pieces of information without having to create unique criteria.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,752
Messages
5,638,162
Members
417,011
Latest member
Amaden95

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top