+ Reply to Thread
Results 1 to 8 of 8

Macro to Filter & Extract Data to a New Workbook

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    EU
    MS-Off Ver
    Excel 2007
    Posts
    4

    Macro to Filter & Extract Data to a New Workbook

    Hi everyone,
    I'm stuck here, trying to write a macro that would filter data out of active worksheet and extract it into a new workbook. Please view attached file for reference.

    I need the macro to filter the data in Activesheet (which would be protected except for column C) and extract each row in which there's a record of items being sold (C<>B; D>0; F>0). The data in column C would be entered manually.

    Also it would be nice if at the same time the macro could copy entire column C and paste it into column B on sheet Stock (which would be hidden) so that the Items Left would represent new amounts of Items in stock. Anyway. this second feature is not of a top priority

    Thank you for your time, friends.
    Attached Files Attached Files

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro to Filter & Extract Data to a New Workbook

    I don't follow, what data are you trying to extract?
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    06-09-2011
    Location
    EU
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro to Filter & Extract Data to a New Workbook

    All of those rows from Activesheet in which there's a record in column C (and C does not equal B) i.e. I need a list of all items that were sold.

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Macro to Filter & Extract Data to a New Workbook

    You can use autofilter or advancedfilter.



  5. #5
    Registered User
    Join Date
    06-09-2011
    Location
    EU
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro to Filter & Extract Data to a New Workbook

    Quote Originally Posted by snb View Post
    You can use autofilter or advancedfilter.
    That doesn't help at all since the workbook will be used by people who don't do copy&paste let alone advanced filter.

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Macro to Filter & Extract Data to a New Workbook

    You can use either method in a macro, so the user only has to click a button etc.

  7. #7
    Registered User
    Join Date
    06-09-2011
    Location
    EU
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Macro to Filter & Extract Data to a New Workbook

    Easy enough, mate

  8. #8
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro to Filter & Extract Data to a New Workbook

    Not exactly sure this is what you are after, but here is the code anyway.

    Code:

    Please Login or Register  to view this content.
    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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