+ Reply to Thread
Results 1 to 7 of 7

Why is my If function that is checking the background color of a cell not working?

  1. #1
    Registered User
    Join Date
    06-17-2021
    Location
    Washington, USA
    MS-Off Ver
    Current
    Posts
    19

    Why is my If function that is checking the background color of a cell not working?

    Hey all! First off, the code:

    Please Login or Register  to view this content.
    The cell is the correct color, yet the if statement is not changing the checkbox at all.
    I'm not too familiar with color indexes but based on what I know, this should be working just fine.

    Am I missing something?

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: Why is my If function that is checking the background color of a cell not working?

    What is the rest of the code?
    Experience trumps academics every day of the week and twice on Sunday.

  3. #3
    Registered User
    Join Date
    06-17-2021
    Location
    Washington, USA
    MS-Off Ver
    Current
    Posts
    19

    Re: Why is my If function that is checking the background color of a cell not working?

    That's the only code that is pertaining to this function. Just a simple checking of a checkbox.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Why is my If function that is checking the background color of a cell not working?

    I suspect jolivanes' point is that we don't even know if that line of code is executed, or if an error occurred and it was picked up by some error handling code.


    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    06-17-2021
    Location
    Washington, USA
    MS-Off Ver
    Current
    Posts
    19

    Re: Why is my If function that is checking the background color of a cell not working?

    Figured it out. Needed to add DisplayFormat to the If statement.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-17-2021
    Location
    Washington, USA
    MS-Off Ver
    Current
    Posts
    19

    Re: Why is my If function that is checking the background color of a cell not working?

    Will keep that in mind for the future. Apologies.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Why is my If function that is checking the background color of a cell not working?

    So, for completeness, the background colour is set by Conditional Formatting. Which would have been helpful to know



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. [SOLVED] GET.CELL function (background color)
    By sonu1975 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-15-2019, 10:10 AM
  2. [SOLVED] Changing cell background color/borders function
    By tigfur in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 04-16-2016, 06:22 AM
  3. Replies: 8
    Last Post: 04-02-2016, 04:00 AM
  4. Change cell background color based on another cells background color
    By Queo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 06-10-2014, 05:28 AM
  5. function to extract background color from one cell to another
    By Francois via OfficeKB.com in forum Excel General
    Replies: 8
    Last Post: 03-07-2013, 12:08 AM
  6. Cell background color (interior color) setting not working
    By Martin E. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2006, 02:10 PM
  7. In Excel is there a function to change a cell's background color?
    By Sireofsix in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-18-2006, 02:59 PM

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