CHOOSE function with Boolean expressions vs. Too many nested IF functions

Reynola5

New Member
Joined
May 7, 2017
Messages
2
Hi, my first time posting. Would really appreciate any help :).

I have a file showing products in one column and the volume of each product in another.

I am trying to create a list of products groupings (CONCATENATE) based on the cumulative volume of the products. Within my source data each product is shown in Column B has a volume in Column E.

The list I wish to create begins in row 385 and I have numbered each item in column C. So the first item in the list is labelled no. “1” in cell C385.
The result I am looking for is that, once the cumulative amount in my data column B exceeds the list number in my results, I can CONCATENATE the names of a set of these products from Column B of my source data.

For example if the cumulative value of my list at cell E286 is 4, the first 4 lines of my results list should populate.
I have a working formula to achieve this as follows:

=(IF(ROUND(SUM($E$283),0)>=C385,(CONCATENATE($B$281,$B$282,$B$283)),” “)&(IF(ROUND(SUM($E$283:$E$284),0)>=C385,(CONCATENATE($B$281,$B$282,$B$284)),” “)&IF(ROUND(SUM($E$283:$E$285),0)>=C385,(CONCATENATE($B$281,$B$282,$B$285)),” “)&IF(ROUND(SUM($E$283:$E$286),0)>=C385,(CONCATENATE($B$281,$B$282,$B$286)),” “)))))

However as the lists are quite long this would require too many nested IF functions. I have heard about using CHOOSE functions with Boolean expressions to achieve such results. I have tried converting my formula to this option below, however I am afraid that I don’t fully understand this formula, particularly the “Error” component. Might someone be able to point out where I am going wrong with the below, or even better suggest an alternative solution to achieve my goal? Any help would really be appreciate

=CHOOSE(1+(ROUND(SUM($E$283),0)>=C385*1+(ROUND(SUM($E$283:$E$284),0)>=C385*2+(ROUND(SUM($E$283:$E$285),0)>=C385*3+(ROUND(SUM($E$283:$E$286),0)>=C385*4,”Error”,(CONCATENATE($B$281,$B$282,$B$283)),(CONCATENATE($B$281,$B$282,$B$284)),(CONCATENATE($B$281,$B$282,$B$285)),(CONCATENATE($B$281,$B$282,$B$286)))

Thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
For example if the cumulative value of my list at cell E286 is 4, the first 4 lines of my results list should populate.
I have a working formula to achieve this as follows:

=(IF(ROUND(SUM($E$283),0)>=C385,(CONCATENATE($B$281,$B$282,$B$283)),” “)&(IF(ROUND(SUM($E$283:$E$284),0)>=C385,(CONCATENATE($B$281,$B$282,$B$284)),” “)&IF(ROUND(SUM($E$283:$E$285),0)>=C385,(CONCATENATE($B$281,$B$282,$B$285)),” “)&IF(ROUND(SUM($E$283:$E$286),0)>=C385,(CONCATENATE($B$281,$B$282,$B$286)),” “)))))

However as the lists are quite long this would require too many nested IF functions.

They are NOT NESTED IFs, so you wouldn't have any limit!

I have heard about using CHOOSE functions with Boolean expressions to achieve such results. I have tried converting my formula to this option below, however I am afraid that I don’t fully understand this formula, particularly the “Error” component. Might someone be able to point out where I am going wrong with the below, or even better suggest an alternative solution to achieve my goal? Any help would really be appreciate

=CHOOSE(1+(ROUND(SUM($E$283),0)>=C385*1+(ROUND(SUM($E$283:$E$284),0)>=C385*2+(ROUND(SUM($E$283:$E$285),0)>=C385*3+(ROUND(SUM($E$283:$E$286),0)>=C385*4,”Error”,(CONCATENATE($B$281,$B$282,$B$283)),(CONCATENATE($B$281,$B$282,$B$284)),(CONCATENATE($B$281,$B$282,$B$285)),(CONCATENATE($B$281,$B$282,$B$286)))

In CHOOSE you have a value of a cell or an expression which relates to the position in a list, Normally this is a serial value incremented from 1.

We will await your screenshot before suggesting how this problem can be solved.
 
Upvote 0
Thank you for the response. This is already quite helpful. I have included a screenshot below with sample data and the result using the IF function. As noted the issue is that I will have numerous Groups and seasons so the formula becomes quite long using IF.

[TABLE="width: 822"]
<tbody>[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]DATA:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Number of Product groupings[/TD]
[TD][/TD]
[TD="align: right"]10[/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Combinations:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Group 1[/TD]
[TD]Proportions[/TD]
[TD]Weighting[/TD]
[TD]Products included in grouping[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Summer [/TD]
[TD="align: right"]60%[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Bargain[/TD]
[TD="align: right"]12%[/TD]
[TD="align: right"]7%[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Saver[/TD]
[TD="align: right"]20%[/TD]
[TD="align: right"]12%[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Standard[/TD]
[TD="align: right"]30%[/TD]
[TD="align: right"]18%[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Premium [/TD]
[TD="align: right"]18%[/TD]
[TD="align: right"]11%[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Luxury[/TD]
[TD="align: right"]20%[/TD]
[TD="align: right"]12%[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Winter[/TD]
[TD="align: right"]40%[/TD]
[TD] [/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Bargain[/TD]
[TD="align: right"]12%[/TD]
[TD="align: right"]5%[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Saver[/TD]
[TD="align: right"]20%[/TD]
[TD="align: right"]8%[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Standard[/TD]
[TD="align: right"]30%[/TD]
[TD="align: right"]12%[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Premium [/TD]
[TD="align: right"]18%[/TD]
[TD="align: right"]7%[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Luxury[/TD]
[TD="align: right"]20%[/TD]
[TD="align: right"]8%[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]RESULTS:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD]#[/TD]
[TD] [/TD]
[TD]Product[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD]Group 1Summer Bargain[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD]Group 1Summer Saver[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD][/TD]
[TD]Group 1Summer Standard[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]4[/TD]
[TD][/TD]
[TD]Group 1Summer Standard[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD]Group 1Summer Premium [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]6[/TD]
[TD][/TD]
[TD]Group 1Summer Luxury[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD]Group 1WinterSaver[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]8[/TD]
[TD][/TD]
[TD]Group 1WinterStandard[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]9[/TD]
[TD][/TD]
[TD]Group 1WinterPremium [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD="align: right"]10[/TD]
[TD] [/TD]
[TD]Group 1WinterLuxury[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Formula for Product #1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD="colspan: 4"] =IF(ROUND(SUM($E$5),0)>=C18,(CONCATENATE($B$3,$B$4,$B$5)),IF(ROUND(SUM($E$5:$E$6),0)>=C18,(CONCATENATE($B$3,$B$4,$B$6)),IF(ROUND(SUM($E$5:$E$7),0)>=C18,(CONCATENATE($B$3,$B$4,$B$7)),IF(ROUND(SUM($E$5:$E$8),0)>=C18,(CONCATENATE($B$3,$B$4,$B$8)),IF(ROUND(SUM($E$5:$E$9),0)>=C18,(CONCATENATE($B$3,$B$4,$B$9)),IF(ROUND(SUM($E$5:$E$11),0)>=C18,(CONCATENATE($B$3,$B$10,$B$11)),IF(ROUND(SUM($E$5:$E$12),0)>=C18,(CONCATENATE($B$3,$B$10,$B$12)),IF(ROUND(SUM($E$5:$E$13),0)>=C18,(CONCATENATE($B$3,$B$10,$B$13)),IF(ROUND(SUM($E$5:$E$14),0)>=C18,(CONCATENATE($B$3,$B$10,$B$14)),IF(ROUND(SUM($E$5:$E$15),0)>=C18,(CONCATENATE($B$3,$B$10,$B$15))))))))))))[/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody><colgroup><col><col><col span="2"><col><col span="2"></colgroup>[/TABLE]
 
Upvote 0
The problem becomes much easier if you add a couple of helper columns:


Book1
ABCDEFGHI
1DATA:RESULTS:
2Number of Product groupings10Product
3Combinations:1Group 1 Summer Bargain
4Group 1ProportionsWeightingProducts included in groupingCumulative countProduct2Group 1 Summer Saver
5Summer60%3Group 1 Summer Standard
6Bargain12%7%11Group 1 Summer Bargain4Group 1 Summer Standard
7Saver20%12%12Group 1 Summer Saver5Group 1 Summer Premium
8Standard30%18%24Group 1 Summer Standard6Group 1 Summer Luxury
9Premium18%11%15Group 1 Summer Premium7Group 1 Winter Saver
10Luxury20%12%16Group 1 Summer Luxury8Group 1 Winter Standard
11Winter40%69Group 1 Winter Premium
12Bargain12%5%06Group 1 Winter Bargain10Group 1 Winter Luxury
13Saver20%8%17Group 1 Winter Saver
14Standard30%12%18Group 1 Winter Standard
15Premium18%7%19Group 1 Winter Premium
16Luxury20%8%110Group 1 Winter Luxury
Sheet1
Cell Formulas
RangeFormula
C6=$B6*$B$5
C12=$B12*$B$11
E6=SUM($D$5:$D6)
F6=$A$4&" "&$A$5&" "&$A6
F12=$A$4&" "&$A$11&" "&$A12
I3=INDEX($F$6:$F$16,IFERROR(MATCH($H3-1,$E$6:$E$16,1)+1,1))


You can always hide them from view ...

WBD
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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