+ Reply to Thread
Results 1 to 2 of 2

Copy rows from a master sheet based on condition

  1. #1
    Registered User
    Join Date
    07-13-2011
    Location
    Santa Barbara, CA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Copy rows from a master sheet based on condition

    Hi,
    I currently have a master address file (approx. 1100 contacts) and 8 separate sheets where I can keep addresses organized by category (Professional, Medical, etc.). In column A I have an indicator that shows which other sheet the contact also belongs in.

    I was wondering if anyone knew how to use visual basic coding to write a macro to scan the first sheet, copy the rows based on the criteria in column A, and paste them into their respective sheets. This way I would only have to update the main sheet and run the macro to organize the file. If you show me how to code it for just one or two of the sheets I could figure the rest out from their.

    Thanks
    Attached Files Attached Files

  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 rows from a master sheet based on condition

    You don't actually NEED separate sheets. Click on row 7 and turn on the Data > FIlter > Autofilter.

    Now you can filter column A anytime by any value to see a short list of any subgroup, you can print the filtered sheet if that's needed, and you can still view ALL at anytime. Extra sheets is just extra plumbing, you don't really gain anything.

    At anytime you can also filter for a specific group and DELETE all the rows left visible, if that's ever your need. Or you can copy the entire group of rows to another sheet, if ever needed.

    But in general, it's simpler to just use the ALL sheet for all work, filter as needed to look at subgroups.
    _________________
    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!)

+ 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