+ Reply to Thread
Results 1 to 8 of 8

Need insert rows for same amount as number in a cell ex. 20 = 20 x insert rows (w attach)

  1. #1
    Registered User
    Join Date
    09-09-2016
    Location
    Montreal Canada
    MS-Off Ver
    Excel 2016
    Posts
    7

    Need insert rows for same amount as number in a cell ex. 20 = 20 x insert rows (w attach)

    Need to insert rows for same amount as the number in a cell, ex. 20 = 20 x insert rows



    We have these files that relates to shipping information for products.
    Each product need to end up on a single row
    Current we have the information for a batch of products.
    . meaning that we know we have 20 x 1 item type.
    . that info is on 1 row with a cell that shows 20.

    We need to end up with 20 rows of the same information but showing 1 x item type per row.

    So to be clear lets use an example:
    - we have 10 rows of batch items
    - each batch has 5 x 1 item type
    - we want to end up with 50 rows in total
    - each row with 1 item

    Any suggestion
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Need insert rows for same amount as number in a cell ex. 20 = 20 x insert rows (w att

    Hi Notwiz,

    See example in file attached.
    Have a sheet called "Input" and data starts in A1.
    Output will be on same sheet in J1.
    Attached Files Attached Files
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Registered User
    Join Date
    09-09-2016
    Location
    Montreal Canada
    MS-Off Ver
    Excel 2016
    Posts
    7

    Re: Need insert rows for same amount as number in a cell ex. 20 = 20 x insert rows (w att

    Hi GC
    Looks great. How do I see the "macro" of formula use to do this?
    tx

  4. #4
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Need insert rows for same amount as number in a cell ex. 20 = 20 x insert rows (w att

    Hi,
    To see the macro, press Alt+F11 to go in the VBA Editor.
    The macro is in Module 1
    Last edited by GC Excel; 09-11-2016 at 03:12 PM. Reason: typo corrected, I meant Alt+F11

  5. #5
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Need insert rows for same amount as number in a cell ex. 20 = 20 x insert rows (w att

    Quote Originally Posted by GC Excel View Post
    Hi,
    To see the macro, press Alt+F1 to go in the VBA Editor.
    Think you meant press Alt+F11
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  6. #6
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Need insert rows for same amount as number in a cell ex. 20 = 20 x insert rows (w att

    You are correct... that was a typo...

  7. #7
    Registered User
    Join Date
    09-09-2016
    Location
    Montreal Canada
    MS-Off Ver
    Excel 2016
    Posts
    7

    Re: Need insert rows for same amount as number in a cell ex. 20 = 20 x insert rows (w att

    Great,
    I will forward to my team and see if works.
    Tx guys,

  8. #8
    Registered User
    Join Date
    09-09-2016
    Location
    Montreal Canada
    MS-Off Ver
    Excel 2016
    Posts
    7

    Re: Need insert rows for same amount as number in a cell ex. 20 = 20 x insert rows (w att

    Hi

    We have additional criteria for this macro:

    Same as before, we need to apply items from 1 line to multiple lines
    However, while doing this we must lookup 3 criteria to match for application to be valid
    1. Date on single row must be same or smaller than date on rows to apply (do not subs
    2. Item number must be the same on single as rows to apply
    3. Qty on single row is maximum number of times it can be applied to rows
    If those criteria are not met, item must not be applied to the line

    Example with desired result in file attached
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 09-11-2016, 12:39 PM
  2. Replies: 1
    Last Post: 09-11-2016, 12:39 PM
  3. [SOLVED] I have a number in a cell and i wantn to insert that amount of rows on sheets from A:H
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2015, 05:02 PM
  4. [SOLVED] insert rows based on number in cell and copy the data down into the new rows
    By pziefle in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-05-2013, 11:19 AM
  5. [SOLVED] Insert Multiple Rows Based Off Number in Cell and Copy Data From Above New Rows
    By tstell1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2012, 04:15 PM
  6. [SOLVED] insert an x number of rows according to data in a cell
    By hoimae in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-24-2012, 05:29 AM
  7. [SOLVED] Insert cell data every given amount of rows
    By Mike Mike in forum Excel General
    Replies: 3
    Last Post: 11-04-2005, 01:45 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