How to combine all cells equal or close to a given value

Gabrielle_erre

New Member
Joined
Jan 3, 2019
Messages
21
Hey... I'm a newie on Excel and I've seen a lot of smart people around. any of you came across the given exemple below?

I've got a column of different products, and I'd like to find all combination of procucts up to a maximum value of 2,45 meters and count all those combinations to optimise the transport.I tried to sum all the numbers and divide them by 2,45 but I can not split the products. I also have some 0 values on the table that I do not need. Anyone has an idea about what I can use...?

number of pallets used high
10,88
11,56
12,24
13,72
11,08
11,96
13,64
12,08
12,76
10,68
12,56
11,08
11,76
13,24
23,16
23,56
00
00
00
00

<colgroup><col width="80" span="2" style="width:60pt"> </colgroup><tbody>
</tbody>


Is there a way through Excel (or anything else if you have in mind) that can list me the best number combinations ?
Thanks in advance!
 

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.
Re: How to ombine all cells equal or close to a given value

there are only two products and many are over 2.45. let alone combine, by themselves are too big for carrier. can you make your problem more clear?
Ravishankar
 
Upvote 0
Re: How to ombine all cells equal or close to a given value

Thank you Ravishankar! The first example was not complete....and it was not very clear.
I would like to combine all the products from column A by they're hights in colomn D, in order to optimise the space. The maximum hight is 2,45 and I would like to know if there is any logical argument I can put, in otder to group them to a value closer to 2,46. for exceple C3 will have 1x2,45 + 1x0,03.
I would like to keep the 2,45 (1xfull) and 0,03 to combine with another one. I will need a function for all the column D. Is possible something like that in Excel...?

ABCD
1ProductquantityNo. Of pallet
2p10,541
3p24,482
4p36,423
5p45,423
6p52,882
7p60,941
8p700
9p81,061

<colgroup><col width="80" span="4" style="width:60pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
Re: How to ombine all cells equal or close to a given value

could you show expected result based on example from post #3 ?
 
Last edited:
Upvote 0
Re: How to ombine all cells equal or close to a given value

hey, I was thinking about something like:

complete pal (2,45)rest to combineCombined pallets max 2,45=Total to transport
0,54 p1
p20,3 p2p2+p4+p5+p80,3 +0,43+0,55+1,06
p31,52 p3p1+p30,54+1,52
p3p60,94
p4
p40,55 p4
p50,43 p5
p60,94 p6
p7
p81,06 p8

<tbody>
</tbody>
 
Last edited:
Upvote 0
Re: How to ombine all cells equal or close to a given value

is that what you want ?
or I misunderstood...

0.01​
0.00​
0.01​
0.00​
0.00​
0.01​
0.01​
Product
P1
P2
P3
P4
P5
P6
P7
P8
TTT
2.42
2.43
2.44
2.45
2.46
2.47
2.48
Given value: 2.45 +/- 0.03Qty
0.54​
0.3​
1.52​
0.55​
0.43​
0.94​
0​
1.06​
2.43​
2.43​
2.45​
2.45​
2.46​
2.46​
2.49​
0​
0​
0​
0​
1
1
1
1
2.43​
0​
0​
0​
0​
1
1
0​
1
2.43​
1
1
0​
1
0​
0​
0​
1
2.45​
1
1
0​
1
0​
0​
1
1
2.45​
1
0​
0​
1
1
1
1
0​
2.46​
1
0​
0​
1
1
1
1
0​
2.46​
1
0​
1
0​
1
0​
1
0​
2.49​
 
Last edited:
Upvote 0
Re: How to ombine all cells equal or close to a given value

YES!

Just that I can not insert the error... and I do not need exact hight of 2,45, just to optimise the hight of pallets. for ex. the rest of incomplete pallets : p1+p2+p4=2,40 is ok, but if it would be 2,46, than I mix any 2 products together and make 1 pallet, +1 additional pallet.
 
Last edited:
Upvote 0
Re: How to ombine all cells equal or close to a given value

so you can take 2.43 and 2.45 then the rest optimise again for 2,45 or less
with Solver

as you can see there is no definite result
 
Last edited:
Upvote 0
Re: How to ombine all cells equal or close to a given value

I did it with Solver, I you don't see it on the Data tab go to Developer tab then Excel Add-ins and mark Solver there

Here is a example excel file

look at A1...G1 (formula) and A3...G3 (another formula)
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,845
Members
449,051
Latest member
excelquestion515

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