+ Reply to Thread
Results 1 to 4 of 4

change shape color based on a cell value on another sheet

  1. #1
    Registered User
    Join Date
    03-02-2011
    Location
    India
    MS-Off Ver
    Excel 2003/2010
    Posts
    38

    change shape color based on a cell value on another sheet

    I wish to write a code by which the rectangle shapes on sheet1 changes the color to red based on Sheet2!A2.

    If A2 is 0, the color of shape 2 should be white and if A2 is 1, then color should be red and so on.

    Can someone help ?

    Thanks,
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: change shape color based on a cell value on another sheet

    The scheme colors aren't the same as the color index colors - but you can play with it

    Try this in the Sheet2 module:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    03-02-2011
    Location
    India
    MS-Off Ver
    Excel 2003/2010
    Posts
    38

    Re: change shape color based on a cell value on another sheet

    Thanks.

    Can you help me understanding this code please?
    Last edited by aleenkhan; 09-14-2017 at 02:45 AM.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: change shape color based on a cell value on another sheet

    Please Login or Register  to view this content.

+ 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. VBA: Change Shape Color based off cell value
    By emmz5d in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2016, 04:35 PM
  2. Shape Color Change Based on Value in different sheet
    By kevinspocket in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2014, 05:50 PM
  3. [SOLVED] Change Shape Fill Color Based on Cell Value
    By Justair07 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-28-2013, 09:35 AM
  4. Change Shape Color based on Cell Values
    By obriend in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-22-2013, 03:26 AM
  5. change color of shape based on value in dropdownlist
    By raketman007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2013, 09:39 AM
  6. Add command button to shape and change shape color on mouseover
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2012, 05:12 PM
  7. trying to change two or more shape's color based on thier location, please advise
    By nimikipod in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2011, 04:01 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