+ Reply to Thread
Results 1 to 7 of 7

Split data with a equal total (approximately)

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    701

    Split data with a equal total (approximately)

    Hi friends,

    I have some data with different numbers. I want to split that data in to 5 equal columns(approx.). Every time I have to do this manually, and its taking too much time.

    Is there any possibility with the excel formulas to get result.

    Please find attachment for better understanding.

    Note : Values no need to come in same order which was in worksheet.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    536

    Re: Split data with a equal total (approximately)

    Hi, Does that give you the results you expect?
    D4 and drag right and down
    =INDEX($A$2:$A$31,5*ROW(1:1)-4+MOD(COLUMN(A$1)-1,5))
    Best Regards,
    Maras.

  3. #3
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    701

    Re: Split data with a equal total (approximately)

    Hi maras_mak,

    With the above formula values coming in order from top to bottom, is there any way to start with min value to max value and total should be close like that.

    Thank you for your help.

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Split data with a equal total (approximately)

    I think your question is unclear and you wish to go left to right on row 1, then right to left on row2 and keep snaking like this till you get to the end of your data, and as the data is sorted this results in roughly equal groups
    =INDEX($A$2:$A$31,IF(ISEVEN( ROW(1:1)),ROW(A1)*5-COLUMN(A1)+1,5*ROW(1:1)-4+MOD(COLUMN(A$1)-1,5)))

    this mimics your example data

  5. #5
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    701

    Re: Split data with a equal total (approximately)

    Thank you davsth,

    Actually numbers will always change, I want to share into 5 parts with same total (max. possibility). Some times numbers will be like below.

    21.540
    15.430
    24.550
    25.400
    21.260
    25.780
    25.410
    25.870
    15.270
    23.900
    20.100
    12.440
    17.500
    25.890
    15.100
    26.700
    21.280
    14.890
    23.670
    19.230
    18.710
    13.590

    I want to split / share above numbers in 5 groups, all groups total will be same (maximum possibility)

    Thank you very much to giving me your valuable time.

  6. #6
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Split data with a equal total (approximately)

    really you need to solve as an optimization problem t get the best answer. however your method if the data isn't sorted

    =SMALL($A$2:$A$31,IF(ISEVEN( ROW(1:1)),ROW(A1)*5-COLUMN(A1)+1,5*ROW(1:1)-4+MOD(COLUMN(A$1)-1,5)))

  7. #7
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,279

    Re: Split data with a equal total (approximately)

    "D4"
    Formula: copy to clipboard
    =IFERROR(IF($C$2>=COLUMNS($A$1:A1),INDEX($A$2:$A$102,(ROWS($A$1:A1))*$C$2-($C$2-COLUMNS($A$1:A1))),""),"")

    copy paste across.
    by pressing shift+ctrl+enter
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] approximately formula by %
    By alenmab in forum Excel General
    Replies: 5
    Last Post: 12-18-2018, 10:07 AM
  2. [SOLVED] Multiplying Total by Percentage then Summing up Result to Equal Original Total
    By adopotato in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-25-2017, 11:48 AM
  3. How to split numbers to specific name and total and split
    By ashokavarthanan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-13-2015, 09:12 AM
  4. Split cell data into rows and average total sum
    By sbhattacharya99 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-20-2013, 08:43 PM
  5. [SOLVED] VBA to split data and apply a percentage sum to total values
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 72
    Last Post: 08-01-2012, 08:45 AM
  6. Drop down box data to equal zero on a running total (?)
    By BuckeyePride in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-18-2012, 12:59 PM
  7. Replies: 0
    Last Post: 01-19-2011, 02:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1