Closed Thread
Results 1 to 2 of 2

Values in Columns to Rows until Sum Equals Value

  1. #1
    Registered User
    Join Date
    02-11-2013
    Location
    Texas
    MS-Off Ver
    Excel 2003
    Posts
    58

    Values in Columns to Rows until Sum Equals Value

    Hello -
    I'm looking for a solution to expedite some data entry needed for a large inventory project. I am able to create Transfer Orders between locations in my company from .txt batch files. My buy sheet shows current overstock in all locations. I would like to write a macro to look at the value needed and insert lines in a worksheet that pulls from overstock values until the needed value is reached.

    Example:
    Location 01 needs 50 pcs of part # abc - inventory in other branches are as follows: 02: 10 pcs, 03: 4 pcs, 04: 30 pcs, 05: 6 pcs

    The macro should insert the following lines on a new worksheet:
    Location Part # Qty
    02 abc 10
    03 abc 4
    04 abc 30
    04 abc 6

    This macro will run for 800+ lines at a time.
    I've attached a small example -
    In the attached sheet, Column G is the value needed - qtys can be pulled from columns N thru S

    Thanks in advance for any help.
    Example.xlsx

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Values in Columns to Rows until Sum Equals Value

    This is duplicated post since same is opened in Commercial services subforum.
    Therefore it will be closed.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Merge Duplicate Rows unique values into single rows for an infinite amount of columns/rows
    By aimeecrystalaid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2013, 08:43 PM
  2. [SOLVED] if cell above number equals Value, sum all number across all rows and columns
    By Portermt in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-27-2013, 06:20 PM
  3. Replies: 4
    Last Post: 06-28-2012, 07:08 AM
  4. Replies: 2
    Last Post: 03-15-2012, 09:12 AM
  5. Selecting columns where cell in row equals value
    By henboffman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-05-2011, 05:27 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