+ Reply to Thread
Results 1 to 6 of 6

Macro is just not doing what I want it to as in filtering

  1. #1
    Forum Contributor
    Join Date
    08-02-2005
    Location
    LONDON
    MS-Off Ver
    OFFICE365
    Posts
    168

    Macro is just not doing what I want it to as in filtering

    Hi

    I have a macro that deletes matching entries but it dont seem to be doing what I want it to and I have found out if I filter by individual machines then it works.

    The macro I have at the moment is shown below. Also attached is the workbook that its in.

    What im trying to do is set it up so it filters it out by machine before the macro runs and then moves onto next machine and carry's on until it gets to and runs the last machine. The machine number will always be in column A of both sheets

    Any ideas?

    Option Explicit

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: Macro is just not doing what I want it to as in filtering

    The workbook sample supplied only has the code, it does not have any data to test the code.

  3. #3
    Forum Contributor
    Join Date
    08-02-2005
    Location
    LONDON
    MS-Off Ver
    OFFICE365
    Posts
    168

    Re: Macro is just not doing what I want it to as in filtering

    Apologies give it a go now,
    Attached Files Attached Files

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: Macro is just not doing what I want it to as in filtering

    What result are you looking for? Is the 5555 the only one that should not be deleted?

  5. #5
    Forum Contributor
    Join Date
    08-02-2005
    Location
    LONDON
    MS-Off Ver
    OFFICE365
    Posts
    168

    Re: Macro is just not doing what I want it to as in filtering

    Correct... 5555 on sheet 1 should not be deleted as there is no data to match on sheet 2 but all others can be as there are matches.

    Also on sheet 2 1419 only needs to be deleted once as there only 1 entry on sheet 1 BUT if there was 2 entries the same on sheets 1 & 2 then I need them both deleted.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,758

    Re: Macro is just not doing what I want it to as in filtering

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Record macro on filtering date, wrong result after running the macro
    By karmapala in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2019, 05:32 AM
  2. Replies: 4
    Last Post: 03-13-2017, 07:49 AM
  3. [SOLVED] Macro for user defined report, filtering issue within Macro
    By Mlanger575 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2016, 06:24 AM
  4. [SOLVED] Filtering via macro?
    By OpOrange in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2015, 04:11 AM
  5. [SOLVED] Filtering Macro
    By sandiptemkar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-01-2012, 06:38 AM
  6. Macro for Filtering
    By gloring in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-28-2008, 10:18 AM
  7. Filtering in a macro
    By sungen99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2005, 02:44 PM

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