Formula that checks 4 different parameters before giving a solution

probexcel

New Member
Joined
Nov 16, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hi, I am have a hard time coming up with a solution for my problem and I'm hoping someone here can guide me.

I have a dataset structured like that:

ProductPackYearTotal
iPhone 6Box201610
iPhone 6Box201713
iPhone 7Box201711
iPhone 7No Box201811
iPhone 8No Box20209
iPhone 8No Box202112
iPhone 9Box20196

I want to add a 5thcolumn that with the following output

ProductPackYearTotalCheck
iPhone 6Box20152
iPhone 6Box201610
iPhone 6Box201713Hold
iPhone 7Box201711
iPhone 7No Box201811
iPhone 8No Box20209
iPhone 8No Box202112
iPhone 9Box20196

Explaining:
  1. Lines 2, 3, and 4 - If I have the same product AND same package, then I want to check if any of the OLDEST products is greater than or equals 10. If it is, then I want to hold the most recent product
    1. iPhone 6 2015 is the most recent product? NO. iPhone 6 2015 has a total of 10 or higher? NO. I don't care.
    2. iPhone 6 2016 is the most recent product? NO. iPhone 6 2016 has a total of 10 or higher? YES. Check Next.
    3. iPhone 6 2017 is the most recent product? YES. iPhone 6 of the older vintages has a total of 10 of higher? YES. iPhone 6 2016 has a total of 10. Then HOLD IT.
  2. Lines 5 and 6 - If I have the same product, but different package, I don't care.
  3. Lines 7 and 8 - If I have the same product AND same package, but none of the oldest ones are 10 or higher in the total column, I also don't care.
    1. iPhone 8 2020 is the most resent product? NO. iPhone 8 2020 has a total of 10 or higher? NO. I don't care, skip product.
  4. Line 9 - If there's no duplicate, I also don't care.

Is there a way to do that with Excel formulas?

TY!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
3. Lines 7 and 8 - If I have the same product AND same package, but none of the oldest ones are 10 or higher in the total column, I also don't care.
  1. iPhone 8 2020 is the most resent product? NO. iPhone 8 2020 has a total of 10 or higher? NO. I don't care, skip product.
But iPhone 8 2021 is a more recent product and has more than 10. What is the rule?
iPhone 8No Box202112
 
Upvote 0
But iPhone 8 2021 is a more recent product and has more than 10. What is the rule?
IF Count(Product & Package) > 1 AND IF MIN(Year for that Product & Package) > Total 10 THEN MAX(Year for that Product & Package) = Hold

For iPhone 8 I have --> Count(Product & Package) > 1 (TRUE) AND MIN(Year for that Product & Package = 2020) > Total 10 (FALSE, Total is 9) THEN nothing
 
Upvote 0
Ok. Now I get it. One last question. What if older model (with the same package) has more than 10 but the most recent is 9?
 
Upvote 0

Forum statistics

Threads
1,215,563
Messages
6,125,568
Members
449,237
Latest member
Chase S

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