+ Reply to Thread
Results 1 to 3 of 3

Delete Rows Based On Color

  1. #1
    Registered User
    Join Date
    02-29-2008
    Posts
    1

    Delete Rows Based On Color

    I have cells that are conditionally formated based on certain criteria. I was hoping someone knew of a macro I could use in order to delete all rows that were conditionally formatted to have a black background? Any help would be greatly appreciated!!!!

    Sincerely,
    Tom

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Conditional formatting

    Hi

    So far as I am aware it is not a simple matter to test for a conditional format in VBA, here is a link that details how it can be achieved http://www.cpearson.com/excel/CFColors.htm.

    If the conditional format conditions are constant it would probably be simpler to test for the condition, rather than the color, and then execute the necessary action.

    Regards

    Jeff

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You have to use the Condition that determines the colour, not the actual colour. So if it all cells > 5 are red, then that is what you look for in the VBA - values > 5.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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