Search multiple criteria for item

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm not sure how to word it, but here goes...
I have two spreadsheets (1 old & 1 new) I need to compare specific criteria. I need to search the old CSV of parts and compare to the new CSV of parts and tell me if we have old parts that match the dimensions of the new parts. The CSV headers in each are identical, but the part numbers have changed. I'm trying to find an easy way to have Excel tell me what the old part number is as a cross reference for the new part number. e.g. If new part 101 is 2x2x1 and old part numbers 609 and 845 are 2x2x1 then Excel list 609 and 845 as the result.

I used COUNTIFS to have it tell me how many match. I'm looking for a way to have it tell me what the associated old part numbers for those matches are. I know there's a way, but I haven't figured out how.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Finally having more time to work on this, the formula [=IF(COLUMN()-8>$F2,"",AGGREGATE(15,6,ROW(OLD_CSV_Multiple!$BJ:$BJ)/(OLD_CSV_Multiple!$BJ:$BJ=$G2),COLUMN()-8))] used on the COMPARISON sheet gives a #NUM! error even if there are multiple matching rows on the old sheet. The link listed in a previous message is still valid.
 
Last edited:
Upvote 0
Did you remember on OLD_CSV_Multiple to put into BJ2 the formula
=Q2&"x"&R2&"x"&K2&"x"&L2&"x"&J2
...and copy it down for every row of data?
 
Upvote 0
Affirmative. I used your formula. To me it looks like it does the same thing as TEXTJOIN. Your formula is used in both OLD column BJ and COMPARISON column G. It's easy to see which should show a result because of the formula used in column F displaying how may old mark numbers match the new criteria.
 
Upvote 0
It should be COMPARISON colum H which has
=A2&"x"&B2&"x"&D2&"x"&E2&"x"&C2
because you had a value in column G row 280.
 
Upvote 0
I don't know what you're talking about. COMPARISON G280 has your formula in it. Your suggestion is not working.
 
Upvote 0
Thank you. It works now.

I've added columns to the right of your formulae having it look at the OLD tab in the row your formula indicates. Do you know if there's a formula that can look on the OLD tab at the indicated row to display the number in that cell? All of the mark numbers on the OLD tab are in column I. I've been typing [=OLD!I] and whatever row your formula indicates. There are a lot of places to type that in. I put the letter I in cell BG2 and tried using TEXTJOIN to eliminate all the extra typing, but Excel doesn't like it. Is there a different method that would work?
 
Upvote 0
Row 17 is the first with any hits and the COUNTIF shows 7 occurrences, so you should copy the formulae in I17
=IF(OR(COLUMN()-8>$F17,$F17=0),"",AGGREGATE(15,6,ROW(OLD_CSV_Multiple!$BJ:$BJ)/(OLD_CSV_Multiple!$BJ:$BJ=$H17),COLUMN()-8))
6 more cells to the right to get all 7 row numbers.

If you want to see the actual values then INDEX into the apprpriate column using the row returned by the AGGREGATE. e.g.
=IF(OR(COLUMN()-8>$F17,$F17=0),"",INDEX(OLD_CSV_Multiple!$A:$A,AGGREGATE(15,6,ROW(OLD_CSV_Multiple!$BJ:$BJ)/(OLD_CSV_Multiple!$BJ:$BJ=$H17),COLUMN()-8)))
gives the OPF ID of 151789
 
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