+ Reply to Thread
Results 1 to 3 of 3

Setting cell format dependent on background colour

  1. #1
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Question Setting cell format dependent on background colour

    Hello,

    My aim is to be able to set a cells "number format" to ";;;" dependent on its colour. Therefore hiding the cells contents if it is not of the desired background colour.

    My spreadsheet currently has macros in it to hide a row if it does not contain the 'targets' background colour. However after this I would like it to hide cells contents if they have a different background colour to the target in the remaining rows leaving only cells with the targets colour.

    I have attached a template spreadsheet to use with the following macros (as mentioned above) already part of it. 2014-2015 Planning template.xlsm

    Please Login or Register  to view this content.
    The second part is that If the Target address is A1 then to set all of the formats back to General.

    Many thanks.
    Last edited by ARowbot; 01-06-2015 at 08:21 AM.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Setting cell format dependent on background colour

    Hi,

    Try this code :

    Please Login or Register  to view this content.
    Regards
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Setting cell format dependent on background colour

    Hi, Thanks for the reply!

    It was almost perfect! I've just added
    Please Login or Register  to view this content.
    The final code for anyone interested....

    Please Login or Register  to view this content.
    Thanks A lot!

+ 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. Format a specific cells background colour permanently
    By hermithead in forum Excel General
    Replies: 3
    Last Post: 10-12-2009, 11:18 PM
  2. Date = ? Format Background Colour
    By Soltisolti in forum Excel General
    Replies: 1
    Last Post: 03-26-2009, 11:07 PM
  3. setting background colour
    By ffffloyd in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-05-2008, 12:05 AM
  4. Auto Format fill colour background on certain cells
    By Zyphon in forum Excel General
    Replies: 21
    Last Post: 04-11-2007, 05:54 AM
  5. change a cell background colour to my own RGB colour requirements
    By Stephen Doughty in forum Excel General
    Replies: 4
    Last Post: 06-16-2006, 08:15 AM

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