+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting - highlight range of cells when it equals a cell

  1. #1
    Registered User
    Join Date
    11-19-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    7

    Conditional formatting - highlight range of cells when it equals a cell

    Hi,

    I have a row of numbers which i would like to highlight once it equals another cell. It'll make sense once you open the attachment.

    So looking at cells F2:AE2, is there a conditional formatting formula to highlight at which point the sum of these cells equals C2?

    So in the example i have given, F2:O2 would equal C2 and the rest of the cells P2:AE2 should be in red.

    Hope that makes sense

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Conditional formatting - highlight range of cells when it equals a cell

    You could try this.

    Select F2:AE2, goto conditional formatting, select the Use formula... option and enter this.

    =SUM($F2:F2)>$C2

    Then format as required.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Conditional formatting - highlight range of cells when it equals a cell

    Hi kingkong321

    See attached.

    Rule 1: =AND(F$2<>"",SUM($F2:F$2)=$C$2)

    Rule 2: =AND(F$2<>"",SUM($F2:F$2)<>$C$2)

  4. #4
    Registered User
    Join Date
    11-19-2012
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Conditional formatting - highlight range of cells when it equals a cell

    Quote Originally Posted by Norie View Post
    You could try this.

    Select F2:AE2, goto conditional formatting, select the Use formula... option and enter this.

    =SUM($F2:F2)>$C2

    Then format as required.

    Worked! 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)

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