+ Reply to Thread
Results 1 to 6 of 6

Ignore cell value is the cell is grey?

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Ignore cell value is the cell is grey?

    Hello Everyone,

    I am in need of a formula (I think a formula?) that will =SUM(K9:K33) but if any of the cells in this range are grey color (R 192, G 192, B 192) then I want them to be ignored and not counted.

    So for example if every cell in the column from K9:K33 contained a number 1 and every cell had no fill apart from cell K16 (for example) that was grey color (R 192, G 192, B 192) (and also contained a one) the total for the column would be 24. There are 25 cells (all containing a 1) but one one of the cells is grey and therefore not counted...

    Thank you in advance for any help,

    Margate

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Ignore cell value is the cell is grey?

    why is it grey? is that just because you chose to do it or is there some logic
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Re: Ignore cell value is the cell is grey?

    Hello Martindwilson,
    All of the cells start out with no color and then turn grey after a macro is run. Every cell in the column has a different macro that will turn it grey if the macro is activated.

    Thank you for your help.

    Margate

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Ignore cell value is the cell is grey?

    then you'll need more code to do it a formula won't recognise cell colour

  5. #5
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Re: Ignore cell value is the cell is grey?

    Ok, no problem, I did not know that. I will post the question on the Macro and VB section of the forum.

    Thank you for your help

    Margate

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Ignore cell value is the cell is grey?

    oops ask an admin to move this thread to the vba sub forum

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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