+ Reply to Thread
Results 1 to 4 of 4

Macro to sum up range and anything above certai value move to next row in group

  1. #1
    Registered User
    Join Date
    01-16-2015
    Location
    St Louis
    MS-Off Ver
    10
    Posts
    9

    Macro to sum up range and anything above certai value move to next row in group

    I need help with a macro to look at a range of BINS with Quantities in them. Match those quantities to a shipment value (starting from the left to right) and anything above the shipment value move to the next row in the same Object group It should keep doing this for each group until the last ROW is met. See images;

    This is before;

    EXCEL-VBA.jpg

    This is after;

    EXCEL-VBA-2.jpg

    ROW is the iteration of the object and represents shipment 1, 2, 3 and 4. 1st shipment of Apples needs 200 from the BINS starting with BIN1 and going to the end. Everything else should go to shipment (ROW 2) until that Shipment quota is met and then everything else go to (ROW 3) etc.

    Any help is greatly appreciated.

  2. #2
    Registered User
    Join Date
    01-16-2015
    Location
    St Louis
    MS-Off Ver
    10
    Posts
    9

    Re: Macro to sum up range and anything above certai value move to next row in group

    Is there a way to do this? have written a few macros but not sure how to solve this one, adding up the individual column values to compare to the shipment needed value and doing the math from there.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to sum up range and anything above certai value move to next row in group

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-16-2015
    Location
    St Louis
    MS-Off Ver
    10
    Posts
    9

    Re: Macro to sum up range and anything above certai value move to next row in group

    Hmmm I ran that macro on the page with my testing data and it didn't do anything..... oh wait you were just summing up each row?

    No I can do that. What I need is a macro that does the math in my original post. Basically for each "Object" there can be several shipments each one indicated by "ROW" number. I would like a macro or something that would compare the BINS starting with 1 and going to 5 with the "Needed For Shipment" number. When that number is reached the remaining values in the row of BINS would drop down to the next ROW (2) and then match those numbers in the same way with the 'Shipment Needed" for that ROW and do the same thing until all the values in the BINS are used up.

+ 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. group and move to x/y axis ?
    By tarpitman111 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-16-2015, 08:28 AM
  2. Macro(?) to move date range
    By bunl in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-02-2015, 10:33 PM
  3. group certain range of rows in excel with vba macro
    By ishu105 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-06-2014, 12:46 PM
  4. Macro to Group Rows Along a Range Based on Values in a Column
    By JHCali in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-06-2013, 10:20 AM
  5. Excel 2011 macro to move rows from one sheet to another and group based on criteria
    By jasond02 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2013, 05:21 PM
  6. macro to group data and define a range name
    By joshnathan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2012, 02:43 AM
  7. Macro to move chart range each time one row down
    By Kinna in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2008, 06:58 AM

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