Results 1 to 6 of 6

How to clear content on the cell that has background color from conditional formatting?

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-04-2015
    Location
    Jakarta
    MS-Off Ver
    15
    Posts
    154

    Post How to clear content on the cell that has background color from conditional formatting?

    Please, help me. I have fill color into cells used conditional formatting. But I can't delete the content using VBA below:
    Sub CCVALUES()
    
    	Range("G1:AK500").Select
    	For Each Cell In Selection
    	If Cell.Interior.ColorIndex = 15 Then
    	Cell.ClearContents
    	End If
    	Next
    
    End Sub
    But if I input the color manually it can finds the color index and clears the content.
    Last edited by putritersenyum; 05-18-2016 at 06:58 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Swapping cell content to INCLUDE CELL FORMATTING (Text color, background color, etc)
    By jcpeterson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2014, 10:09 AM
  2. [SOLVED] Conditional Formatting Cell Background Color
    By claudia.p in forum Excel General
    Replies: 3
    Last Post: 07-02-2014, 10:50 AM
  3. [SOLVED] Conditional formatting to adapt font color to background color
    By jankee in forum Excel General
    Replies: 4
    Last Post: 08-23-2013, 09:38 AM
  4. To clear content if conditional formatting cell return gray color
    By W.Patrick in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-18-2013, 01:00 PM
  5. Replies: 1
    Last Post: 11-11-2012, 09:33 AM
  6. [SOLVED] Conditional Formatting, current cell color follows to diff cell based on content
    By iallenwood in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2012, 04:13 PM
  7. Replies: 5
    Last Post: 02-11-2006, 07:12 PM

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