Split table in 4 equivalent parts by 3 criteria

Cristy

New Member
Joined
Mar 24, 2009
Messages
43
Hi all,
I have a table with the folowing structure:
ID(integer)Value1(Double)Value2(Double)

<tbody>
</tbody>

I need to split this table in 4 equals parts:
- count of id must be equal or close to equal(ex: 467 split in 3 x 117 and 116) for each part
- the cumulated Value1 and Value2 must be equal or close to equal for each part

Can u please help with a solution

Thx
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
If there were only one value, it would be straightforward; nothing jumps out at me for acommodating two.

Are the two values correlated in some way?
 
Upvote 0
No, they are not correlated.
But the solution with one value will be helpful rather then nothing.
 
Upvote 0
Sort descending by value, then

A​
B​
C​
D​
E​
F​
G​
H​
I​
1​
Part 1​
Part 2​
Part 3​
Part 4​
2​
ID​
Value1​
Assign​
0​
0​
0​
0​
D2:G2: Input
3​
12​
100​
Part 1
100​
0​
0​
0​
C3 and down: =INDEX($D$1:$G$1, MATCH(MIN(D2:G2), D2:G2, 0))
4​
2​
96​
Part 2
100​
96​
0​
0​
D3 and across and down: =D2 + ($C3=D$1)*$B3
5​
3​
95​
Part 3
100​
96​
95​
0​
6​
17​
90​
Part 4
100​
96​
95​
90​
7​
16​
87​
Part 4
100​
96​
95​
177​
8​
10​
78​
Part 3
100​
96​
173​
177​
9​
4​
77​
Part 2
100​
173​
173​
177​
10​
6​
76​
Part 1
176​
173​
173​
177​
11​
5​
75​
Part 2
176​
248​
173​
177​
12​
9​
72​
Part 3
176​
248​
245​
177​
13​
14​
66​
Part 1
242​
248​
245​
177​
14​
1​
54​
Part 4
242​
248​
245​
231​
15​
13​
36​
Part 4
242​
248​
245​
267​
16​
15​
36​
Part 1
278​
248​
245​
267​
17​
7​
30​
Part 3
278​
248​
275​
267​
18​
20​
30​
Part 2
278​
278​
275​
267​
19​
19​
15​
Part 4
278​
278​
275​
282​
20​
11​
12​
Part 3
278​
278​
287​
282​
21​
18​
4​
Part 1
282​
278​
287​
282​
22​
8​
3​
Part 2
282​
281​
287​
282​
 
Upvote 0
Thx, but i am looking for a solution in Access, because this table is a part of a process in access.
 
Upvote 0
Dang, sorry, didn't notice the forum. I can't even spell Excess.
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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