+ Reply to Thread
Results 1 to 3 of 3

MACRO copy/paste different criteria to separate worksheets?

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    Parsippany, New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    2

    Lightbulb MACRO copy/paste different criteria to separate worksheets?

    Hello all,

    I am very new to VBA and have just started using Macros recently.

    I have a workbook that contains 6 columns of data. The last column of data contains names of devices pertaining to 2 specific groups, and I need to filter each of these device names to their corresponding groups and separate them. Each group has a different worksheet within the book.


    The basics are:

    - I need two destination worksheets (VPN/MSI)
    - The VPN sheet has to contain all devices ending in -me2 & -me4.
    - The MSI sheet has to contain all devices ending in -th8.
    - All devices are in Column F
    - There will only be devices ending with these characters; no other endings. However, the first 8 letters will all be different. (ex: *th8)
    - The source is Sheet1 and the size will vary depending on the device, so I think I'd need a loop on this?

    Eventually I'll be playing around with the VBA to meet more specific needs, however I'd like to play around and figure that out on my own. Starting from scratch on this "base" macro has been too difficult for me! Any help would be greatly appreciated and will give me a good starting point for learning how to do this on my own.

    I've tried following http://www.rondebruin.nl/copy5_2.htm but I don't know how to add another destination sheet that meets my criteria.

    Thanks everybody!

    edit: I've attached a copy of my sheet

    Notification.xlsm
    Last edited by attn2risky; 05-10-2012 at 01:02 PM. Reason: added example

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: MACRO copy/paste different criteria to separate worksheets?

    hi attn2risky, welcome to ExcelForum, I would suggest to use this simple code, please check attachment, run code "test"
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    Parsippany, New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: MACRO copy/paste different criteria to separate worksheets?

    Hi Watersev,

    This worked perfectly!! Sorry for the late reply. I've combined it with other tidbits that I've figure out and have successfully created my first VBA macro! Thanks for your assistance, watersev!

+ 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