+ Reply to Thread
Results 1 to 7 of 7

Copy rows from one worksheet to another worksheet based on a cell criteria.

  1. #1
    Registered User
    Join Date
    07-08-2011
    Location
    Calgary, AB
    MS-Off Ver
    Excel 2007
    Posts
    9

    Copy rows from one worksheet to another worksheet based on a cell criteria.

    Hi,

    I am trying to copy rows of data to separate worksheets based on a value in column A of a master worksheet.

    My workbook has five worksheets - Calc (The value to match for extraction is in a drop down in column A), Surface, Middle, Bottom (These correspond to the values in the drop down in column A in the Calc sheet), and Data1 (this is a sheet that populates data into the Calc sheet based on a drop down list in column B of the Calc sheet).

    What I need is a way to have all the rows that match Surface, Middle and Bottom in column A of the Calc sheet to populate onto the worksheets called Surface, Middle and Bottom. I have copied the header row from the Calc worksheet into the Surface, Middle and Bottom sheets so the copied rows will have to start populating into the first blank row under the header row. I need to keep all of the rows on the Calc worksheet.

    I have been searching for a formula to use for this to no avail. I tried to construct a formula using lookups and matching but had no success. I'm not sure if there is a simple formula for this or not. I suspect that VBA may be the solution however I know nothing about VBA and though I have seen other posts with a similar situation to mine, I am unsure what values to substitute to make it work in my case.

    Any help that you can provide is greatly appreciated.

    Thanks
    Last edited by keneco; 05-06-2013 at 12:28 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,317

    Re: Copy rows from one worksheet to another worksheet based on a cell criteria.

    It could be done with three fairly simple formulae. There are many similar threads on this forum with titles like yours - did you try searching for them?

    Pete

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy rows from one worksheet to another worksheet based on a cell criteria.

    Try the attached code, not a formula.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-08-2011
    Location
    Calgary, AB
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Copy rows from one worksheet to another worksheet based on a cell criteria.

    Maybe I wasn't using the correct terms.

  5. #5
    Registered User
    Join Date
    07-08-2011
    Location
    Calgary, AB
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Copy rows from one worksheet to another worksheet based on a cell criteria.

    Quote Originally Posted by AB33 View Post
    Try the attached code, not a formula.
    Works perfect! Thanks for the help!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,317

    Re: Copy rows from one worksheet to another worksheet based on a cell criteria.

    Here's a formula-based solution, for comparison.

    Hope this helps.

    Pete
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-08-2011
    Location
    Calgary, AB
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Copy rows from one worksheet to another worksheet based on a cell criteria.

    Quote Originally Posted by Pete_UK View Post
    Here's a formula-based solution, for comparison.

    Hope this helps.

    Pete
    Thanks Pete! This method works great as well. VBA and formulas both serve the purpose depending on the situation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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