KuraiChikara
Board Regular
- Joined
- Nov 16, 2016
- Messages
- 111
- Office Version
- 2013
- Platform
- 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?
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
SHEET 1 VALUE DATA
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?
Name | Day | Item | Lookup Value | Vlookup Formula |
John | Monday | Apples | John | =VLOOKUP(D2,$A$1:$C$3,3,FALSE) |
John | Tuesday | Pears | =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
Name | Item 1 | Item 2 | Item 3 | Item 4 |
John | Apples | Pears | Strawberries | Pineapples |
SHEET 1 VALUE DATA
Name | Item |
John | Apples |
John | Pears |
John | Strawberries |
John | Pineapples |