Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conditional Formatting of maximum value in each row of many

I have a spreadsheet with 250+ rows of data and need to find the largest value in each row. I tried to use Conditional Formatting, however I need the same rule for each row so can't highlight all the data, and trying to copy and paste it would be too cumbersome.

Is there a faster way of applying the same rule to each row separately?

like image 327
Eastern Computers Avatar asked Nov 27 '15 17:11

Eastern Computers


People also ask

How do you apply a conditional formatting rule to multiple rows?

First, select the cell where conditional formatting is already applied. After that, go to the Home tab and click on the Format Painter icon. Now, just select the cells from multiple rows. Conditional formatting will be automatically applied to all the cells.

How do I find the maximum value of multiple rows in Excel?

If your numbers are in a contiguous row or column (like in this example), you can get Excel to make a Max formula for you automatically. Here's how: Select the cells with your numbers. On the Home tab, in the Formats group, click AutoSum and pick Max from the drop-down list.

How do you use maximum value in conditional formatting?

In the formula box, type the MAX formula: =C2 = MAX($C2:$E2) The first reference to C2 is relative, so each cell will check its value compared to the MAX in the $C2:$E2 range. Click Format, and on the Font tab, select Red as the font colour, then click OK, twice, to close the dialog boxes.


2 Answers

Please select he relevant columns (say A:H) and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::

=A1=MAX($A1:$H1)

Format..., select your choice of formatting, OK, OK.

If you want the formatting to stop when there are no values in the row adjust to:

 =AND(COUNT($A1:$H1)<>0,A1=MAX($A1:$H1))
like image 145
pnuts Avatar answered Sep 30 '22 08:09

pnuts


Formula: =A1=MAX(A:A) (don’t use $)

Applies To: =$A:$D

enter image description here

To shift columns, change the starting point of the formula AND the “Applies To” range.

Formula: =C1=MAX(C:C) (don’t use $)

Applies To: =$C:$F

enter image description here

Formula: =A2=MAX(2:2) (don’t use $)

Applies To: =$2:$11

*Shift first row down to adjust for header row

enter image description here

Finally, as pnuts shows in the post above, to correct for cell overflow into blanks cells/rows/columns (shown here)

enter image description here

Use the following variation:

(the same for rows/columns and MIN/MAX)

Formula: =AND(COUNT(C:C)<>0,C1=MAX(C:C)) (don’t use $)

Applies To: =$C:$F

like image 22
mreinsmith Avatar answered Sep 30 '22 08:09

mreinsmith