+ Reply to Thread
Results 1 to 10 of 10

Conditional Formatting For Text Inside Shapes

  1. #1
    Registered User
    Join Date
    09-26-2014
    Location
    County Durham
    MS-Off Ver
    2007
    Posts
    8

    Conditional Formatting For Text Inside Shapes

    Morning,

    I'm trying to complete a dashboard and have started to use shapes to make it look pretty. Inside the shapes I have them linked to cells however need some conditional formatting to go green or red depending if they are above or below average. I added the conditional formatting to the origin cell, but this didn't reflect in the shape.

    I have attached an example I am working on, the shapes are all grouped at the moment, but i need to conditional formatting for each shape against if its below or above average (31.19%);

    Excel Forum.xlsx

    I have searched for other topics and didnt seem to find a solution.

    Many Thanks
    Last edited by Louis.Shakespeare; 09-26-2014 at 04:42 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,809

    Re: Conditional Formatting For Text Inside Shapes

    Conditional formatting can be applied only to cells, not text in shapes. If you need dynamic formatting of shape text then you need to use macros. I looked at your file and it would not be a huge effort but not trivial either.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    09-26-2014
    Location
    County Durham
    MS-Off Ver
    2007
    Posts
    8

    Re: Conditional Formatting For Text Inside Shapes

    Thanks for the response, atleast I know where to direct my attention too.

    So basically get the macro to check the value in the shape and highlight and change colour accordingly? Or check the actual origin cells?

    I'm not great with VBA but always keen to learn so I will give it a go :-)

    Thanks again.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,809

    Re: Conditional Formatting For Text Inside Shapes

    Here is the basic idea. I am fairly experienced with VBA but not in working with manipulating shapes. This code does not work; I get an error on the With line. But this is the idea. You would have to have a case for each different cell that is linked to a shape.

    I cannot figure out how to address the text in that box. The grouping may complicate matters. Also odd is that the big box at the bottom and the second box from the top are both named "Rounded Rectangle 24". I don't know how that's possible.

    Please Login or Register  to view this content.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,450

    Re: Conditional Formatting For Text Inside Shapes

    No need for vba.

    You just need to use multiple shapes to display the variation in formatting.
    I have added 3 formula to columns M:O. One of the cells will display the value. You link that to 3 shapes and format each of the shapes to correspond to either red/green/black value.

    I have done the first box and the value is now random so you can press F9 to see the value change
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  6. #6
    Registered User
    Join Date
    09-26-2014
    Location
    County Durham
    MS-Off Ver
    2007
    Posts
    8

    Re: Conditional Formatting For Text Inside Shapes

    Marvellous.

    I won't get to have a look until I log back on at work but if I need any further help (which I'm sure I wont) I will use this thread to ask.

    Thanks

  7. #7
    Registered User
    Join Date
    09-26-2014
    Location
    County Durham
    MS-Off Ver
    2007
    Posts
    8

    Re: Conditional Formatting For Text Inside Shapes

    Morning,

    The method of adding that additional formula doesnt work for when the text is green. I amended it to recognise the alternative argument =IF($I10>$I$15,TEXT($I10,"0.00%"),IF($I10<$I$15,TEXT($I10,"0.00%"),"") but turns all the text red for some reason and doesnt recognise when i want to highlight green.

    I will try fiddle about on VBA in the mean time, will keep me busy.

    Thanks

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,450

    Re: Conditional Formatting For Text Inside Shapes

    Works for me. Guess you must be doing something different to my example.

  9. #9
    Registered User
    Join Date
    09-26-2014
    Location
    County Durham
    MS-Off Ver
    2007
    Posts
    8

    Re: Conditional Formatting For Text Inside Shapes

    That's weird, so you can get it to work when the text should be green, using the same method i've used?

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,450

    Re: Conditional Formatting For Text Inside Shapes

    Depends on which method you are referring to.

    I the example I attached you can press F9 to recalc values. When green value appears in M9 then the textbox should be displaying green value.

+ 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. conditional formatting shapes
    By carpetmanist in forum Excel General
    Replies: 0
    Last Post: 01-15-2014, 12:03 PM
  2. Conditional Formatting for shapes in Excel
    By carlobulalo in forum Excel General
    Replies: 1
    Last Post: 08-15-2013, 06:36 AM
  3. [SOLVED] locate shapes with specified text inside
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2005, 10:05 AM
  4. Replace conditional Formatting with Shapes
    By Rikuk in forum Excel General
    Replies: 2
    Last Post: 08-23-2005, 09:05 PM
  5. Replace conditional Formatting with Shapes
    By Rikuk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2005, 09:05 PM

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