+ Reply to Thread
Results 1 to 4 of 4

Copy and Paste multiple lines with the same criteria in one cell

  1. #1
    Registered User
    Join Date
    04-29-2015
    Location
    Twin Falls, Idaho
    MS-Off Ver
    2013
    Posts
    5

    Copy and Paste multiple lines with the same criteria in one cell

    Good Evening,
    I am horrible with Marcos and VBAs, and I believe I am going to need something like this for what I am trying to do.
    I am working with Build of Materials to produce one item, and for each item I need certain amount of materials.
    I have one sheet that shows an item that is running and what line it is running on. I would like to see if there is a VBA that would copy and paste all of the items that it takes to create one case (From a master sheet of all items and materials used for each item) and paste all of the lines into another tab for each line that they are running on. I have attached a snip of what I am working on to help. (The rows that need to be copied and pasted will vary depending on each item number).
    Please let me know if you can help me!

    Snip of BOMs.xlsx

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy and Paste multiple lines with the same criteria in one cell

    1) Edit the RUNNING and the LINE 20 tabs to remove the hidden spaces at the end of the tab names. Oops.

    2) This macro will format the Line tabs to receive the incoming data and mark the rows "Sent" on the Running tab so as to not transfer the same row more than once. This way you can add to the list on the Running tab even after the macro is run, then safely run it again.

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-29-2015
    Location
    Twin Falls, Idaho
    MS-Off Ver
    2013
    Posts
    5

    Re: Copy and Paste multiple lines with the same criteria in one cell

    I am not sure if I am putting this in the sheet wrong, but for some reason it doesn't like the line : Set OutSH = Sheets("Line " & .Range("D" & Rw).Value)

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy and Paste multiple lines with the same criteria in one cell

    Post your updated workbook with the macro installed so I can observe it misbehaving directly.

+ 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] Need VBA to Copy/Paste multiple Different Lines from Data Sheet to Different Tabs
    By Aeneren in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2015, 04:20 PM
  2. [SOLVED] Help with Copy/Paste multiple Different Lines from Data Sheet to Different Tabs
    By Aeneren in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-13-2015, 11:31 AM
  3. [SOLVED] Copy and paste specific cell to another sheet based on multiple criteria
    By impresxy in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-09-2015, 07:11 AM
  4. Copy/Paste Formula for Multiple Criteria
    By quibilty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-12-2014, 11:07 PM
  5. Copy/Paste cells based on multiple criteria
    By Nick83Weasel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2012, 04:58 AM
  6. I need to paste multiple lines of text into just one cell
    By Kanigetts in forum Excel General
    Replies: 2
    Last Post: 09-24-2012, 12:13 PM
  7. [SOLVED] Move Formula Multiple Lines With Copy, Paste
    By danderson2692 in forum Excel General
    Replies: 2
    Last Post: 06-14-2012, 09:47 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