+ Reply to Thread
Results 1 to 6 of 6

Copy rows with specific text in cell to another sheet

  1. #1
    Registered User
    Join Date
    02-14-2015
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    2

    Copy rows with specific text in cell to another sheet

    Hi

    I need help with a code to automatically copy rows with specific text in one of the columns to another tab with the same name.
    For example as attached i need the row with the contractor name appearing "hoover" to be copies over to the hoover tab and the row with the simpson tab to be copies to simpson tab. All others to be copies to the Misc tab.
    The master sheet name is "data entry".
    Much appreciated.









    i Records.xlsm

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Copy rows with specific text in cell to another sheet

    Hi hummy and welcome to the forum,

    Here is code that should do what you want:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Copy rows with specific text in cell to another sheet

    Are not the line
    Please Login or Register  to view this content.
    missing from the code?

    Alf

  4. #4
    Registered User
    Join Date
    02-14-2015
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    2

    Re: Copy rows with specific text in cell to another sheet

    Thanks Marvin and Alf.
    I can't seem to get it to work, anyhow ive made changes and looking for code the the following please,
    Im new to VB so please tell me where to paste the code and run it.
    The sheet attached is still correct but the contractor and secondary contractor columns is what im searching for and copying to the tabs with the same name.
    I have 8 different contractor names in both colomns g and h, for eg name1, name2, name3 etc with tab (sheet) names being same. The master sheet is still called data entry.
    What i need is if name1 appears in column g and or h to copy that row to name1 tab and so forth. It needs to go through all the names then if dosent appear row to copy to misc tab.
    Also can it update automatically or will need to run the macro every time data is entered into data entry sheet.
    Thanks in advance

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Copy rows with specific text in cell to another sheet

    As my comment was just a question if a line was missing in the code I'll now leave you in Marvin's capable hands.

    Alf

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Copy rows with specific text in cell to another sheet

    Hey hummy,

    Find the attached with the code in a MODULE not behind a workbook. Click on your Developer Tab and then Macro to run the code.
    If you don't see a developer tab then read and follow this: http://www.excel-easy.com/examples/developer-tab.html

    You will need to add names of contractors or subs to the code AND add the TABS using their exactly spelled names (you spelled Simpson as Spimson in your example)

+ 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] Copy rows with specific text in specific column into specific sheet
    By Valemaar in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-22-2014, 03:23 PM
  2. Replies: 3
    Last Post: 08-06-2014, 07:57 AM
  3. Replies: 3
    Last Post: 10-31-2013, 03:41 PM
  4. If cell contains specific text automatically copy row to different sheet
    By donnzi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-18-2013, 03:41 AM
  5. Replies: 5
    Last Post: 02-10-2013, 05:16 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