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

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Welcome to Mr Excel forum

I would create a helper column. Something like this


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

<tbody>
</tbody>


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

A
B
C
D
1
Supplier​
Part​
Last report date?​
Report number​
2
3209​
802371​
22/08/2016​
11730​
3
3024​
504503​
24/08/2016​
11732​
4
3182​
803068​
02/09/2016​
11739​
5
30419​
130902-02255​
24/08/2016​
11735​

<tbody>
</tbody>


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,215,455
Messages
6,124,935
Members
449,195
Latest member
Stevenciu

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