Excel logic for multiple conditions

Manatarms

New Member
Joined
Oct 12, 2021
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Hi - some help needed please as it’s making my brain explode…!

I have rows of data of parts that are ordered by different shops. I need to identify when the same shop has made orders for 2 specific parts on a list - they can order other parts - but only if they make orders for both parts as this makes a set.
Each row has only 1 part per row so needs to be able to identify firstly if there are orders for the 2 parts from the list in the dataset, then work out if they are from the same shop.


Hopefully this makes sense, any help greatly appreciated! Thks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I'm not sure if I got what you want... This will look for a match for the same shop on the same day for the related part.

MrExcelPlayground4.xlsx
ABCDEF
1DateShopPartProblem?Parts that should be a pair
210/1/2021A100 200
310/1/2021A300 201
410/1/2021A200Problem
510/1/2021B100 
610/1/2021B101 
710/1/2021C200 
810/1/2021C201 
910/1/2021C300 
1010/1/2021C301 
1110/1/2021C400 
1210/2/2021A200 
1310/2/2021A201 
1410/2/2021A300 
1510/2/2021B100 
1610/2/2021B101 
1710/3/2021A102 
1810/3/2021A103 
1910/3/2021B200 
2010/3/2021B201 
2110/3/2021C100 
2210/3/2021C102 
2310/3/2021C103 
2410/3/2021C200Problem
2510/3/2021C250 
2610/3/2021C300 
2710/3/2021C350 
2810/3/2021C400 
2910/4/2021A115 
3010/4/2021A201Problem
3110/4/2021A250 
3210/4/2021A340 
3310/4/2021A500 
3410/4/2021B200 
3510/4/2021B201 
3610/4/2021B250 
3710/4/2021B300 
3810/4/2021C100 
3910/4/2021C101 
Sheet16
Cell Formulas
RangeFormula
D2:D39D2=IF(ISNA(IF(C2=F$2,MATCH(A2&B2&$F$3,$A$2:$A$39&$B$2:$B$39&$C$2:$C$39,0),IF(C2=F$3,MATCH(A2&B2&$F$2,$A$2:$A$39&$B$2:$B$39&$C$2:$C$39,0),""))),"Problem","")
 
Upvote 0
Many thanks James, however it’s not quite what I need - my bad for not explaining properly sorry.
I need to know how many sets of parts each shop is buying, so using your data as an example, shop A has bought two sets (200 and 201 x 2 each). Shop C has bought one set (200 and 201) so I need the total number of sets bought. Shop C has also bought another 200 (10/3/21) but as there is not a second purchase for another 201 this is not a full set.
Hopefully that is a bit clearer! Thanks again!
 
Upvote 0
Maybe it's simpler then...

MrExcelPlayground4.xlsx
ABCDEFGH
1DateShopPartProblem?Parts that should be a pair
210/1/2021A100 200
310/1/2021A300 201
410/1/2021A200Problem
510/1/2021B100 
610/1/2021B101 
710/1/2021C200 
810/1/2021C201 
910/1/2021C300 Shop200201
1010/1/2021C301 A22
1110/1/2021C400 B22
1210/2/2021A200 C21
1310/2/2021A201 
1410/2/2021A300 
1510/2/2021B100 
1610/2/2021B101 
1710/3/2021A102 
1810/3/2021A103 
1910/3/2021B200 
2010/3/2021B201 
2110/3/2021C100 
2210/3/2021C102 
2310/3/2021C103 
2410/3/2021C200Problem
2510/3/2021C250 
2610/3/2021C300 
2710/3/2021C350 
2810/3/2021C400 
2910/4/2021A115 
3010/4/2021A201Problem
3110/4/2021A250 
3210/4/2021A340 
3310/4/2021A500 
3410/4/2021B200 
3510/4/2021B201 
3610/4/2021B250 
3710/4/2021B300 
3810/4/2021C100 
3910/4/2021C101 
Sheet16
Cell Formulas
RangeFormula
G10:H12G10=COUNTIFS($B$2:$B$39,$F10,$C$2:$C$39,G$9)
D2:D39D2=IF(ISNA(IF(C2=F$2,MATCH(A2&B2&$F$3,$A$2:$A$39&$B$2:$B$39&$C$2:$C$39,0),IF(C2=F$3,MATCH(A2&B2&$F$2,$A$2:$A$39&$B$2:$B$39&$C$2:$C$39,0),""))),"Problem","")
 
Upvote 0
This works a great! Many thanks for your help JamesCanale really appreciated!
 
Upvote 0

Forum statistics

Threads
1,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

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