+ Reply to Thread
Results 1 to 3 of 3

Fill Cell with Color from Shape's color code

  1. #1
    Registered User
    Join Date
    05-28-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    19

    Question Fill Cell with Color from Shape's color code

    Hi,

    I have a few shapes which is colored based on a color code (number). I want to replicate the color on the cell so the users can choose the colours they want the shape to be.

    For example:
    Shape 1---red
    Shape 2---blue

    On the speadsheet, I want to have
    Red Cell---color code of red
    Blue Cell---color code of blue

    For my shapes, I am using this code:
    myShape.Fill.ForeColor.SchemeColor = myColorCode

    I am unable to replicate the same color on my cell, how can I do that? Thanks in advance.

  2. #2
    Registered User
    Join Date
    05-28-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Fill Cell with Color from Shape's color code

    hello, any help on this? I cant solve this

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: Fill Cell with Color from Shape's color code

    I dont think there is any way to change the color of a cell using a formula, other than doing it through conditional formatting. But CF relies on the value in a cell, and a "shape" in a cell is not a value. If you could add some value under your shape that the CF could work with though........
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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