+ Reply to Thread
Results 1 to 3 of 3

Change Autoshape Color in one worksheet based on cell value in a different worksheet

  1. #1
    Registered User
    Join Date
    08-03-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Change Autoshape Color in one worksheet based on cell value in a different worksheet

    I need to change the color of an autoshape in one worksheet based on the cell value in a different worksheet.
    The Worksheet Change event seems to work only when both the cell and the shape are in the same worksheet.
    The cell contains a formula that calculates the percentage based on input numbers, I need the autoshape to show
    red when percentage <=25,
    yellow when % > 25 and % <= 50
    blue when % > 50 and % <= 75
    and green when % > 75

  2. #2
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    308

    Re: Change Autoshape Color in one worksheet based on cell value in a different worksheet

    Hi Vigny and welcome to the forum.

    You can reference other sheets from the Change Event macro using Sheets("SheetName"). The change event should be in the sheet with the percentage on it.

    Alternatively, if you can use WingDings instead of an autoshape, you would be able to use Conditional Formatting. You will need to use named ranges to achieve this. So, create a named range, e.g. MyPercentage, referencing the cell with the percentage in it. Swap to the other sheet and use that name in your formula for creating conditional formatting.

    If this doesn't answer your question, can you upload a copy of the worksheet? To do this, press Go Advanced below then Manage Attachments.

    Best regards, Rob.

  3. #3
    Registered User
    Join Date
    08-03-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Change Autoshape Color in one worksheet based on cell value in a different worksheet

    Thank you Rob
    The first method worked

    Regards
    Vigny
    Last edited by Vigny Mathew; 08-03-2012 at 11:13 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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