+ Reply to Thread
Results 1 to 6 of 6

Data segmenting according to specific total of a column

  1. #1
    Forum Contributor
    Join Date
    04-04-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    197

    Data segmenting according to specific total of a column

    I have a worksheet with two columns: ColA with over 320,000 rows of data of file sizes in bytes, and ColB which contains the equivelant value of ColA in megabytes.

    I am in need to divide ColA data into segements separated with one empty row. Dividing should occure when the total value of ColB reaches around 900 megabyte more or less.

    In addition, each segment's total of megabytes besides the total number of rows for that segment should be placed in the last row of that segment in ColC and ColD.

    I am attaching part of my real data in both columns A & B in Sheet1. I have also manually caculated and segmented the first two groups of ColA in Sheet2 as an example of the final product.

    Can I get some expert assistance with this request please?

    Many thanks in advance.

    T.
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: 2019 but still use also older versions
    Posts
    7,362

    Re: Data segmenting according to specific total of a column

    Such macro (for large files may not be quick - if you have many of them and need quicker processing - let us know) shall do the work:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    04-04-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    197

    Re: Data segmenting according to specific total of a column

    More than excellent Kaper .. really fantastic .. the desired result is achieved through your genius code which ran smoothly and fast despite the large number of rows.
    Thank you very much for such great work.
    Please accept my deep respect and gratitude.

    T.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,490

    Re: Data segmenting according to specific total of a column

    Another way to do, should be faster ...!
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  5. #5
    Forum Contributor
    Join Date
    04-04-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    197

    Re: Data segmenting according to specific total of a column

    Thank you very much PCI, you have always been of a great assistance to me in many issues, and here, again, you're proving that. Sure your code does the job as exactly as desired, which is enriching this question with such amazing code. I hope this question will be of great benefit to the general who have a similar issue.

    Merci beaucoup, je suis très reconnaissant.

    T.

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,490

    Re: Data segmenting according to specific total of a column

    Content d'avoir aider, à une prochaine fois.
    Please to help, see for next time

+ 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] Get Total of specific value in column...
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-27-2018, 03:14 PM
  2. [SOLVED] how to specific total of column lable in pivot???
    By sharadmaxwell in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 05-17-2016, 12:37 AM
  3. [SOLVED] Create formula to sum column total if specific text is present in second column
    By Banir in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2013, 07:48 AM
  4. Need Help in creating summary report segmenting the data further
    By shaiq123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-15-2013, 06:56 AM
  5. Getting the total # of hours in a column but with specific conditions
    By cmgtlg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-15-2012, 08:45 AM
  6. Selecting Cells From Column at Random for a Specific Sum Total
    By anaisconce in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2010, 07:39 AM
  7. [SOLVED] Adding total dollars based on specific data from another column
    By Espo in forum Excel General
    Replies: 1
    Last Post: 06-13-2005, 03:05 PM

Tags for this Thread

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