Lookup a value based on common factors in the same row

27POP27

New Member
Joined
May 14, 2019
Messages
4
I apologise in advance. This issue can seem complicated. However, I'll try to simplify this as much as possible, without leaving out important criteria.

I work in the quality engineering business, and I'll use the relevant terms here:
Supplier number — This is a number that identifies a specific supplier.
Part number — This is a number that identifies a specific part.
Report number — This is a number that identifies a specific report. (A report always contains a supplier, part, and creation date).

What I want, is to lookup a report creation date and report number based on my criteria: Supplier and Part.
Look at the image below. It's divided into three sections: The left is my source data, the middle is what criteria I have, and what I'm missing, and the right is what the solution should look like.

IQg13Tw.png


Column B contains the common denominator for the grouping logic. One report number contains 1 supplier and 1 or more parts.
What I want to lookup the report date and number using only the SUPPLIER & PART criteria, as you can see in the middle/right section.

Here's the Excel sheet with this sample for experimentation.
https://drive.google.com/file/d/1q2QrrQQO-gKyd16J_PfiiUiichiOWDWM/view?usp=sharing


Additional info:
This problem would be much simpler if the SOURCE SHEET listed the information such that each row has a unique report value, with a supplier and part value. Such as:
Row 1: Report creation date | Report number | Supplier number | Part number
Row 2: 01.01.2018 11529 3026 805425
Row 3: etcetc...

Then I would just use a INDEX(MATCH(1;(supplier array = supplier)*(part array = part)).
However, here the supplier and part information is scattered on the same column over multiple rows.


EDIT: If anything is unclear feel free to ask.
 
Last edited by a moderator:

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Welcome to Mr Excel forum

I would create a helper column. Something like this


[TABLE="class: grid"]
<tbody>[TR]
[TD="bgcolor: #DCE6F1"][/TD]
[TD="bgcolor: #DCE6F1"]
A
[/TD]
[TD="bgcolor: #DCE6F1"]
B
[/TD]
[TD="bgcolor: #DCE6F1"]
C
[/TD]
[TD="bgcolor: #DCE6F1"]
D
[/TD]
[TD="bgcolor: #DCE6F1"]
E
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
1
[/TD]
[TD]
NCR Creation Date​
[/TD]
[TD]
Report number​
[/TD]
[TD]
Object​
[/TD]
[TD]
Object Key​
[/TD]
[TD]
Supplier ID
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
2
[/TD]
[TD]
22/08/2016​
[/TD]
[TD]
11729​
[/TD]
[TD]
Part catalog​
[/TD]
[TD]
Part No: 156137​
[/TD]
[TD]
SupplierID:3513​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
3
[/TD]
[TD]
22/08/2016​
[/TD]
[TD]
11729​
[/TD]
[TD]
Supplier Info​
[/TD]
[TD]
Supplier ID: 3513​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
4
[/TD]
[TD]
22/08/2016​
[/TD]
[TD]
11730​
[/TD]
[TD]
Part catalog​
[/TD]
[TD]
Part No: 802371​
[/TD]
[TD]
SupplierID:3209​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
5
[/TD]
[TD]
22/08/2016​
[/TD]
[TD]
11730​
[/TD]
[TD]
Supplier Info​
[/TD]
[TD]
Supplier ID: 3209​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
6
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11732​
[/TD]
[TD]
Part catalog​
[/TD]
[TD]
Part No: 504503​
[/TD]
[TD]
SupplierID:3024​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
7
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11732​
[/TD]
[TD]
Supplier Info​
[/TD]
[TD]
Supplier ID: 3024​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
8
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11733​
[/TD]
[TD]
Part catalog​
[/TD]
[TD]
Part No: 803068​
[/TD]
[TD]
SupplierID:3182​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
9
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11733​
[/TD]
[TD]
Supplier Info​
[/TD]
[TD]
Supplier ID: 3182​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
10
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11735​
[/TD]
[TD]
Part catalog​
[/TD]
[TD]
Part No: 110508-13551​
[/TD]
[TD]
SupplierID:30419​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
11
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11735​
[/TD]
[TD]
Part catalog​
[/TD]
[TD]
Part No: 130902-02255​
[/TD]
[TD]
SupplierID:30419​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
12
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11735​
[/TD]
[TD]
Part catalog​
[/TD]
[TD]
Part No: 400602-00695​
[/TD]
[TD]
SupplierID:30419​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
13
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11735​
[/TD]
[TD]
Supplier Info​
[/TD]
[TD]
Supplier ID: 30419​
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
14
[/TD]
[TD]
02/09/2016​
[/TD]
[TD]
11739​
[/TD]
[TD]
Part catalog​
[/TD]
[TD]
Part No: 803068​
[/TD]
[TD]
SupplierID:3182​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
15
[/TD]
[TD]
02/09/2016​
[/TD]
[TD]
11739​
[/TD]
[TD]
Supplier Info​
[/TD]
[TD]
Supplier ID: 3182​
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Formula in E2 copied down
=SUBSTITUTE(IF(ISNUMBER(SEARCH("Supplier",D2)),"",INDEX(D2:D$10000,MATCH("Supplier*",D2:D$10000,0)))," ","")

In the other sheet

[TABLE="class: grid"]
<tbody>[TR]
[TD="bgcolor: #DCE6F1"][/TD]
[TD="bgcolor: #DCE6F1"]
A
[/TD]
[TD="bgcolor: #DCE6F1"]
B
[/TD]
[TD="bgcolor: #DCE6F1"]
C
[/TD]
[TD="bgcolor: #DCE6F1"]
D
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
1
[/TD]
[TD]
Supplier​
[/TD]
[TD]
Part​
[/TD]
[TD]
Last report date?​
[/TD]
[TD]
Report number​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
2
[/TD]
[TD]
3209​
[/TD]
[TD]
802371​
[/TD]
[TD]
22/08/2016​
[/TD]
[TD]
11730​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
3
[/TD]
[TD]
3024​
[/TD]
[TD]
504503​
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11732​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
4
[/TD]
[TD]
3182​
[/TD]
[TD]
803068​
[/TD]
[TD]
02/09/2016​
[/TD]
[TD]
11739​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
5
[/TD]
[TD]
30419​
[/TD]
[TD]
130902-02255​
[/TD]
[TD]
24/08/2016​
[/TD]
[TD]
11735​
[/TD]
[/TR]
</tbody>[/TABLE]


Array formula in C2 copied down
=LARGE(IF('Report Check'!E$2:E$15="SupplierID:"&$A2,IF(RIGHT(TRIM('Report Check'!D$2:D$15),LEN($B2))=TRIM($B2),'Report Check'!A$2:A$15)),1)
Ctrl+Shift+Enter

Array formula in D2 copied down
=INDEX('Report Check'!B$2:B$15,MATCH(1,IF('Report Check'!A$2:A$15=C2,IF('Report Check'!E$2:E$15="SupplierID:"&$A2,1)),0))
Ctrl+Shift+Enter

Hope this helps

M.
 
Last edited:
Upvote 0
Cross posted https://www.excelforum.com/excel-ge...ria-but-the-source-is-in-the-same-column.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
@marcelobranco

I've been testing these formulas a while on my 2000+ row sheet and this works perfectly:)
Thanks a lot. +1

This is thread is now solved.
 
Upvote 0
Cross posted https://www.excelforum.com/excel-ge...ria-but-the-source-is-in-the-same-column.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

My apologies. The other thread seemed to die off, so I created one here. I'll refer cross threads in the future at once.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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
Back
Top