+ Reply to Thread
Results 1 to 3 of 3

Moving records to a new sheet

  1. #1
    Registered User
    Join Date
    04-25-2005
    Posts
    99

    Moving records to a new sheet

    I have a workbook with one worksheet in it. In this one (Master) worksheet there are a lot of records (rows). In each row there is either a 1, 2, 3, 4, etc... and I want to copy all the 1s to a new sheet, 2s to a new sheet, etc...

    This should be a simple task, but I'm confused by it.

    Some of the tabs will have multiple numbers in them. For example 4, 5, 9 are all in the same tab. I thought it would be best to use a Select Case statement for this, but I'm open to suggestions.

    Any and All help is much appreciated,

    DejaVu

  2. #2
    Tom Ogilvy
    Guest

    Re: Moving records to a new sheet

    This should get you started (Ron de Bruin's site)
    http://www.rondebruin.nl/copy5.htm

    --
    Regards,
    Tom Ogilvy

    "DejaVu" <DejaVu.1zqtta_1134082202.2575@excelforum-nospam.com> wrote in
    message news:DejaVu.1zqtta_1134082202.2575@excelforum-nospam.com...
    >
    > I have a workbook with one worksheet in it. In this one (Master)
    > worksheet there are a lot of records (rows). In each row there is
    > either a 1, 2, 3, 4, etc... and I want to copy all the 1s to a new
    > sheet, 2s to a new sheet, etc...
    >
    > This should be a simple task, but I'm confused by it.
    >
    > Some of the tabs will have multiple numbers in them. For example 4, 5,
    > 9 are all in the same tab. I thought it would be best to use a Select
    > Case statement for this, but I'm open to suggestions.
    >
    > Any and All help is much appreciated,
    >
    > DejaVu
    >
    >
    > --
    > DejaVu
    > ------------------------------------------------------------------------
    > DejaVu's Profile:

    http://www.excelforum.com/member.php...o&userid=22629
    > View this thread: http://www.excelforum.com/showthread...hreadid=492025
    >




  3. #3
    Registered User
    Join Date
    04-25-2005
    Posts
    99
    Thanks for the reference Tom. I went to the website you suggested and tried some of his code.
    The Sub that was closest to what I was needing (or so I think) is Sub Copy_With_AdvancedFilter_To_Worksheets.

    The only problem is that I want to copy the entire row, not just one cell in a given range. Here is the snippet of code that I think needs to be changed to copy the entire row, but I'm not sure.

    ' rng.AdvancedFilter Action:=xlFilterCopy, _
    ' CriteriaRange:=.Range("IU1:IU2"), _
    ' CopyToRange:=WSNew.Range("A1"), _
    ' Unique:=False

    TIA,

    DejaVu

+ 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