+ Reply to Thread
Results 1 to 4 of 4

Can't Clear Cell Contents After Conditional Format

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    Simi Valley, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Can't Clear Cell Contents After Conditional Format

    I set the fill color of cells conditionally using the bright yellow color from the default tablet as follows...

    Please Login or Register  to view this content.
    My problem is now trying to "clear the contents" of cells with this color. I've tried all sorts of variations and nothing seems to work. I tired color = 6, color = 27. I tried "Cell.Interior.ColorIndex" as well using different color codes and nothing clears the contents. Here's what I thought should work...

    Please Login or Register  to view this content.
    Any suggestions very much appreciated.

  2. #2
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: Can't Clear Cell Contents After Conditional Format

    Conditional formatting doesn't set the .interior.color like you would expect. You will need to check the conditions that trigger the conditional formatting instead. Something like:

    Please Login or Register  to view this content.
    From your original formula, it looks like you are highlighting column A when column C = "[No Product Description]". Then, in your second macro, you check for highlighted items and clear the contents. Since the only items that are highlighted are in column A, I reduced the range to C2:C5000, and only clear contents on column A when a match if found.

  3. #3
    Registered User
    Join Date
    07-24-2012
    Location
    Simi Valley, CA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Thumbs up Re: Can't Clear Cell Contents After Conditional Format

    Thanks so much Wallyeye. I'll stop with the colors now and use your suggestion of offsets around my criteria. Makes sense since it's what I used to set the condition in the first place.

    Thank You!

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Can't Clear Cell Contents After Conditional Format

    @ Speedy1

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a 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)

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