+ Reply to Thread
Results 1 to 4 of 4

If any cell in named range = 8 then shade named range

  1. #1
    JJ
    Guest

    If any cell in named range = 8 then shade named range

    How would I do this please?

    If any one of the cells in the range("Block_Three") = 8 then shade the
    range("Block_Three") yellow.




  2. #2
    Tom Ogilvy
    Guest

    Re: If any cell in named range = 8 then shade named range

    if application.countif(Range("Block_Three"),8) > 0 then
    Range("Block_Three").Interior.ColorIndex = 6
    End if


    or if only exactly 1
    if application.countif(Range("Block_Three"),8) = 1 then
    Range("Block_Three").Interior.ColorIndex = 6
    End if

    --
    Regards,
    Tom Ogilvy



    "JJ" <[email protected]> wrote in message
    news:[email protected]...
    > How would I do this please?
    >
    > If any one of the cells in the range("Block_Three") = 8 then shade the
    > range("Block_Three") yellow.
    >
    >
    >




  3. #3
    Doug Glancy
    Guest

    Re: If any cell in named range = 8 then shade named range

    JJ,

    Use Format --> Conditional Formatting in Excel. Highlight Block_Three and
    enter this formula in the dialog:

    =COUNTIF(Block_Three,8)

    Then choose yellow as the format.

    hth,

    Doug

    "JJ" <[email protected]> wrote in message
    news:[email protected]...
    > How would I do this please?
    >
    > If any one of the cells in the range("Block_Three") = 8 then shade the
    > range("Block_Three") yellow.
    >
    >
    >




  4. #4
    JJ
    Guest

    Re: If any cell in named range = 8 then shade named range

    Fantastic Tom, thank you.


    "Tom Ogilvy" <[email protected]> wrote in message
    news:[email protected]...
    > if application.countif(Range("Block_Three"),8) > 0 then
    > Range("Block_Three").Interior.ColorIndex = 6
    > End if
    >
    >
    > or if only exactly 1
    > if application.countif(Range("Block_Three"),8) = 1 then
    > Range("Block_Three").Interior.ColorIndex = 6
    > End if
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "JJ" <[email protected]> wrote in message
    > news:[email protected]...
    >> How would I do this please?
    >>
    >> If any one of the cells in the range("Block_Three") = 8 then shade the
    >> range("Block_Three") yellow.
    >>
    >>
    >>

    >
    >




+ 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