+ Reply to Thread
Results 1 to 3 of 3

macro to copy multiple rows to separate worksheets

  1. #1
    OrlaH
    Guest

    macro to copy multiple rows to separate worksheets

    Hi:
    I have a range of data on a single worksheet:
    1 name1 address1
    1 name2 address2
    2 name3 address3
    3 name4 address4
    3 name5 address5
    3 name6 address6

    I have to copy all rows with 1 in column A to a separate worksheet called 1,
    and the same for "2" and "3". I'm a bit iffy on how to use the VLOOKUP (is
    it relevant here?). I have 1500 lines of data so am looking to automate.

    thanks for your help.


  2. #2
    Dave Peterson
    Guest

    Re: macro to copy multiple rows to separate worksheets

    I'd use a macro.

    You may want to look at the way Ron de Bruin and Debra Dalgleish approached it:

    Ron de Bruin's EasyFilter addin:
    http://www.rondebruin.nl/easyfilter.htm

    Code from Debra Dalgleish's site:
    http://www.contextures.com/excelfiles.html

    Create New Sheets from Filtered List -- uses an Advanced Filter to create
    separate sheet of orders for each sales rep visible in a filtered list; macro
    automates the filter. AdvFilterRepFiltered.xls 35 kb

    Update Sheets from Master -- uses an Advanced Filter to send data from
    Master sheet to individual worksheets -- replaces old data with current.
    AdvFilterCity.xls 55 kb

    If you're new to macros, you may want to read David McRitchie's intro at:
    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    OrlaH wrote:
    >
    > Hi:
    > I have a range of data on a single worksheet:
    > 1 name1 address1
    > 1 name2 address2
    > 2 name3 address3
    > 3 name4 address4
    > 3 name5 address5
    > 3 name6 address6
    >
    > I have to copy all rows with 1 in column A to a separate worksheet called 1,
    > and the same for "2" and "3". I'm a bit iffy on how to use the VLOOKUP (is
    > it relevant here?). I have 1500 lines of data so am looking to automate.
    >
    > thanks for your help.


    --

    Dave Peterson

  3. #3
    OrlaH
    Guest

    Re: macro to copy multiple rows to separate worksheets

    Thanks a mill Dave. Debra Dalgleish's code worked a treat. I'm now going to
    try and figure out how it actually works! Thanks again.

    "Dave Peterson" wrote:

    > I'd use a macro.
    >
    > You may want to look at the way Ron de Bruin and Debra Dalgleish approached it:
    >
    > Ron de Bruin's EasyFilter addin:
    > http://www.rondebruin.nl/easyfilter.htm
    >
    > Code from Debra Dalgleish's site:
    > http://www.contextures.com/excelfiles.html
    >
    > Create New Sheets from Filtered List -- uses an Advanced Filter to create
    > separate sheet of orders for each sales rep visible in a filtered list; macro
    > automates the filter. AdvFilterRepFiltered.xls 35 kb
    >
    > Update Sheets from Master -- uses an Advanced Filter to send data from
    > Master sheet to individual worksheets -- replaces old data with current.
    > AdvFilterCity.xls 55 kb
    >
    > If you're new to macros, you may want to read David McRitchie's intro at:
    > http://www.mvps.org/dmcritchie/excel/getstarted.htm
    >
    > OrlaH wrote:
    > >
    > > Hi:
    > > I have a range of data on a single worksheet:
    > > 1 name1 address1
    > > 1 name2 address2
    > > 2 name3 address3
    > > 3 name4 address4
    > > 3 name5 address5
    > > 3 name6 address6
    > >
    > > I have to copy all rows with 1 in column A to a separate worksheet called 1,
    > > and the same for "2" and "3". I'm a bit iffy on how to use the VLOOKUP (is
    > > it relevant here?). I have 1500 lines of data so am looking to automate.
    > >
    > > thanks for your help.

    >
    > --
    >
    > Dave Peterson
    >


+ 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