Double Column Matching and fill value with criteria

iceburger96

New Member
Joined
Jul 7, 2021
Messages
6
Office Version
  1. 2010
Platform
  1. Windows
Hi all, first of all, thank you in advance if you could help me solve the below excel puzzle. ;)

needs matching and filling of data.xlsx
ABCDEFGHIJK
1Data Set 1Data Set 2
2POPart No.commit datequantityY/NPOPart No.07-21-202107-22-202107-23-2021
3PO0001A001PO0005A00250
4PO0002A001PO0008A0054030
5PO0003A001PO0001A00150
6PO0004A002PO0004A00210050
7PO0005A002PO0003A001
8PO0006A003PO0006A003100
9PO0007A004PO0007A004100100200
10PO0008A005PO0002A00140
11PO0009A006PO0009A00610050
12PO0010A008PO0010A009
Sheet1


We have 2 sets of data here, PO and part no. both must MATCH EXACTLY before we can input value into data set 1.

Let's look at data set 2.

As you can see, we have 3 dates with data set 2. We only need to input the number with the latest date into data set 1's quantity (which is column D).

For example, PO0006 (G8) we take the 100 to fill into D8. PO0005 (G3) we take the 50 to fill into D7. PO0007 (G9) we take the 100 to fill into D9.

Second, we need to fill the date that we took the number from into data set 1 at column C.

For example, PO0006 (G8) the 100 corresponds to 07-21-2021 then this date needs to fill into C8. PO0005 (G3) the 50 corresponds to 07-22-2021 then this date needs to fill into C7. You get the idea.

Third, wherever there is value in both column C and D, we will need to put a 'Y' in column E.

Please let me know if you have any solutions to this puzzle.

Thank you again.

Regards
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Firstly that data isnt set out well. Design is everything if you then want to query it. Secondly if you want to return the latest date quantity why is PO0007 100? Surely its 200 if following your rules?
 
Upvote 0
Hi Steve the fish, thank you for your reply. I assume that you refer to the PO sequence of the data set 2 that I didn't set out well?

For your second question, the number that we want is the number under the nearest date to today. For PO0007 in data set 2, we will take 100 (I9), as 7-21-2021 is nearest to today's date. For PO0002, we then take 40 (J10), as I10 has no value.

Thank you.
 
Upvote 0
Yes your 2nd set of data would be much easier to work with if it was one row for each piece of data, PO, Part, Date. You didnt actually say closest to today anywhere as far as i could see. You said latest.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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