Conditional formatting independently for multiple rows

Anonymous
2018-11-08T11:56:41+00:00

Hello,

I have already googled for the answer but cannot find exactly what I need.

I have an excel spreadsheet with 4 columns with different numbers in each cell.

There are about 450 rows to the table.

For each row, I would like to apply the 2-colour scale conditional format to show which values are highest and which are lowest (and which come in between).

I then want to apply this format to all other rows.

The issue I have had is I can only get it to format a colour scale for the spreadsheet as a whole, rather than independently colour scale for each row.

Does anyone have any suggestions how to independently colour scale each row?

Thanks in advance.

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Lz._ 38,106 Reputation points Volunteer Moderator
    2018-11-14T08:15:44+00:00

    Hi,

    You want the largest1, largest2... per Row. So, from your last picture formula must be:

    =C13=LARGE($C13:$F13,4)

    Same goes for the other rules

    =C13=LARGE($C13:$F13,3)

    =C13=LARGE($C13:$F13,2)

    =C13=LARGE($C13:$F13,1)

    0 comments No comments

15 additional answers

Sort by: Most helpful
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2018-11-08T12:37:38+00:00

    Set the conditional formatting rule for the first row that you want to apply it to.

    Then select the entire range.

    Run the following macro:

    Sub CopyCF()

        Dim rng As Range

        Dim r As Long

        Set rng = Selection

        rng.Rows(1).Copy

        For r = 2 To rng.Rows.Count

            rng.Rows(r).PasteSpecial Paste:=xlPasteFormats

        Next r

    End Sub

    Warning: the macro will create 450 conditional formatting rules!

    6 people found this answer helpful.
    0 comments No comments
  2. Vijay A. Verma 104.7K Reputation points Volunteer Moderator
    2018-11-08T13:05:54+00:00

    Home tab > Conditional Formatting > Manage Rules > Select the box above to show rules for this worksheet > Now select your rule > In Applies to box, change the range appropriately say A2:D451

    0 comments No comments
  3. HansV 462.4K Reputation points MVP Volunteer Moderator
    2018-11-08T13:56:35+00:00

    @Vijay_Verma: that won't apply the colour scale for each row independently, as requested by the OP.

    3 people found this answer helpful.
    0 comments No comments
  4. Lz._ 38,106 Reputation points Volunteer Moderator
    2018-11-08T14:51:31+00:00

    Hi

    If it was me I would create 4 Cond. Format. rules with formulas that mimic the 2-colour scale:

    All rules applies to =$A$2:$D$21 in the above example, rules formula:

    1. =A2=LARGE($A2:$D2,4)
    2. =A2=LARGE($A2:$D2,3)
    3. =A2=LARGE($A2:$D2,2)
    4. =A2=LARGE($A2:$D2,1)
    • with 450 rows  would check Stop If True next to each rule for obvious perf. reasons:

    2 people found this answer helpful.
    0 comments No comments