Compare two rows for partial or full match

Thaleus

New Member
Joined
Jun 15, 2018
Messages
4
Is there a way to have Excel compare cells in a row to cells in another row (on a different sheet or excel file) to look for a partial or full match and return the row “name”? Example below. One file lists the possible packages and what is contained in those packages (Package A has a nut, bolt, widget, and spacer) a separate file or sheet contains the order from a customer. The contents of the order are compared to the contents of all of the packages, and any rows that contain all of the contents of the order are returned as “if you order this you get everything you need”. Trying to figure this out has me stumped…. Any help is really, really appreciated!

Available packages
Pkg Anutboltwidgetspacer
Pkg Bspacerboltnut
Pkg Cboltnutwidget
Pkg Dboltnutspacer
Customer Order(Goal)
Order 1boltnutspacerPkg D
Order 2boltwidgetPkg A, Pkg C
Order 3spacero-ringnutn/a

<colgroup><col span="5"><col></colgroup><tbody>
</tbody>
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi Thaleus,
that's quite an interesting puzzle. I'd go for the easiest route and add some helper colums after your orders, checking for every Pkg if it has all the items (one Pkg per column). Trying to get it all in one cells will create one big unreadable array function.
Something like this, matching the order items in B8:D8 with Pkg A in B2:E2:
=MIN(IF(D8<>"",IFERROR(MATCH(D8,$B$2:$E$2,0),0),1),IF(C8<>"",IFERROR(MATCH(C8,$B$2:$E$2,0),0),1),IF(B8<>"",IFERROR(MATCH(B8,$B$2:$E$2,0),0),1))

Two sites that help with more complex formula:
https://www.get-digital-help.com/20...t-string-and-return-multiple-adjacent-values/
https://exceljet.net/formula/cell-contains-all-of-many-things

Cheers,

Koen
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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