+ Reply to Thread
Results 1 to 2 of 2

Change a Range's cell background color to that of another cell's cond. format color

  1. #1
    Forum Contributor
    Join Date
    01-06-2011
    Location
    cleveland
    MS-Off Ver
    Excel 2007
    Posts
    223

    Change a Range's cell background color to that of another cell's cond. format color

    Please Login or Register  to view this content.
    cell CE29 has a conditional format color based off a graded color scale - I want to set the Range A1:C30 to this cell's color with a macro. Is this possible? when i run the above code it changes cell background color to white and not the conditional format color.

  2. #2
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Change a Range's cell background color to that of another cell's cond. format color

    In VBA, not really. Believe it or not, conditional formatting color results are not exposed to VBA. When a CF cell is tested the results that come back are the colors applied to the cell directly, not the results of the CF rules active on that cell. Odd, huh?

    In these scenarios, I would simply apply the same CF rule to A1:C30 that is on CE29 to get the same result.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

+ 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. Change cell background color based on another cells background color
    By Queo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 06-10-2014, 05:28 AM
  2. Replies: 2
    Last Post: 02-25-2013, 03:36 AM
  3. Dynamically change cell range in formula by background color?
    By albert@netmation.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2006, 05:15 PM
  4. Replies: 4
    Last Post: 01-09-2006, 04:35 AM
  5. [SOLVED] Change th cell Background color with sylk format
    By hYoussef in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-14-2005, 09:06 AM

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