+ Reply to Thread
Results 1 to 4 of 4

Delete rows based on multiple criteria including COLOUR, or while FILTERED

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    97

    Delete rows based on multiple criteria including COLOUR, or while FILTERED

    The example worksheet shows the results of code run to identify numbers in column B which are triplicates (and above). The cell of these is then coloured CYAN (0, 255, 255).

    What I want to do now is delete the entire row where only these triplicates (and above) have the same name in both column F and G.

    There are other rows with same names in F and G, but if B is not CYAN, they stay.

    The problem:

    When I FILTER column B on the Cyan cell colour then run code to remove the “same names” in F and G, this code does not work because the list is filtered.

    If I run the code on an unfiltered list, all “same names” in F and G get deleted, including the rows I want to keep.

    What I need is code to EITHER:

    Delete only the qualifying rows when the list is filtered, or, include the colour Cyan in a three criteria code on an unfiltered list e.g. B = Cyan (0, 255, 255), F = same name as G, and G = same name as F.

    Note: The names for F and G are referenced from Sheet 2 but it is possible that this may not be needed if F = G and G= F. This is best left to you code masters as to which option is best.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Delete rows based on multiple criteria including COLOUR, or while FILTERED

    Here you go:

    Please Login or Register  to view this content.
    I first used code to find the B column color, then used that to make the determination to delete rows. Let us know if you have questions

  3. #3
    Registered User
    Join Date
    07-24-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Delete rows based on multiple criteria including COLOUR, or while FILTERED

    Thank you. This brilliant.

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Delete rows based on multiple criteria including COLOUR, or while FILTERED

    If that takes care of your original question, please select*Thread Tools*from the menu link above and mark this thread as SOLVED.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. VBA to delete rows based on multiple criteria
    By jamesmullens in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2017, 06:33 AM
  2. [SOLVED] Delete rows based on filtered criteria
    By Ramzes in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-08-2017, 07:01 AM
  3. Delete Multiple Rows based on Criteria
    By athyeh in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-20-2013, 03:13 PM
  4. [SOLVED] Delete Rows based on Multiple Name Criteria
    By Graham Taylor in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-14-2012, 09:11 AM
  5. Delete rows based on multiple criteria
    By ohkking in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-18-2011, 11:30 AM
  6. Delete rows based on multiple criteria
    By couger77 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2007, 03:29 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