How To Count Conditionally Based On % Mix?

xlmaniac

Well-known Member
Joined
Jul 2, 2009
Messages
528
Office Version
  1. 2010
Platform
  1. Windows
Dear All,
I do have Stylewise Weekwise % Mix Sample data set across A1:I3 as follows:-

StyleWeek-1Week-2Week-3Week-4Week-5Week-6Week-7Week-8
A12%14%18%20%10%11%8%7%
B10%12%14%15%16%13%10%10%

<tbody>
</tbody>
I would like to find out how many weeks % Mix contribute to 45%-50%, 75%-80% & 100%
My desired Result across A5:D7 is as follows:-
Style45%-50%75%-80%100%
A558
B468

<tbody>
</tbody>
Above metrics indicates that for Style A, 5 Weeks sales contribute between 45%-50%, 5 Weeks sales contribute between 75%-80% & 8 weeks contribute 100%.

Similarly,Above metrics indicates that for Style B, 4 Weeks sales contribute between 45%-50%, 6 Weeks sales contribute between 75%-80% & 8 weeks contribute 100%.

Could somebody help to solve my issue?

Regards
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I'm not sure if I understand your question, You'd like to find minimum number of records, such that the distribution requirements (45%-50%) are satisfied, right?
 
Upvote 0
I'm not sure if I understand your question, You'd like to find minimum number of records, such that the distribution requirements (45%-50%) are satisfied, right?

Dear Piotrekp1,
Yes you are absolutely right in understanding the problem.
Pls suggest the solution.
Regards
 
Upvote 0
Then I'm right that if we have dataset with examples: 50%, 20%, 20%, 5%, 5%, then the result for 40%-45% should be 2, right? What if there is no such combination (15% with this dataset)
 
Upvote 0
Then I'm right that if we have dataset with examples: 50%, 20%, 20%, 5%, 5%, then the result for 40%-45% should be 2, right? What if there is no such combination (15% with this dataset)

Dear Piotrekp1,
Yes, as per your example it should yield 2.
But as per my requirement(45%-50%) it should be 3(based on your example).
I did not understand your last question. Could you pls elaborate?
Regards
 
Upvote 0
i meant dataset with examples: 50%. 20%, 20%, 5%, 5% and query like 12%-17%. But I guess it doesn't really matter. The issue is that this is NP-complete problem (generalization of a subset sum), what basically means that it's really hard computationally and the natural way of thinking about is by thinking about every possible subset, which is super unnatural for excel, i'm not really an expert at excel, but I'd recommend you using different tool for this one, like python for example, or you could search in the internet for the subset sum solver.

Cheers
 
Upvote 0
i meant dataset with examples: 50%. 20%, 20%, 5%, 5% and query like 12%-17%. But I guess it doesn't really matter. The issue is that this is NP-complete problem (generalization of a subset sum), what basically means that it's really hard computationally and the natural way of thinking about is by thinking about every possible subset, which is super unnatural for excel, i'm not really an expert at excel, but I'd recommend you using different tool for this one, like python for example, or you could search in the internet for the subset sum solver.

Cheers

Thanks a lot for all the support extended and time spent behind my problem.
As suggested, I will search on the topics that you have advised.
 
Upvote 0

Forum statistics

Threads
1,217,388
Messages
6,136,311
Members
450,003
Latest member
AnnetteP

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