Google-sheets – Highlight second highest number in Google Sheets row

conditional formattinggoogle sheets

I am attempting to use conditional formatting to highlight the second highest number in a row in Google Spreadsheets. I've set it to "format cells if custom formula is", applied to range "CO27:DB27" and I've tried the following;

=large(unique(CO$27:DB$27),2)
=LARGE(CO27:DB27, 2)
=INDEX(SORT(UNIQUE(CO27:DB27),1,FALSE),1,0)

These highlighted everything.

=LARGE(CO27:DB27, 3)

This highlighted everything BUT my second highest number and changing the 3 to a 4 then unhighlighted the cell next to it as well, which was not a high number at all. Since my highest number is in DB27, 3 un-highlighted it, 4 unhighlighted it and DB26.

=$CO27:$DB27=max($CO27:$DB27)

This is what I'm using to highlight the highest.

Best Answer

Short Answer

Try

=RANK(CO27,$CO$27:$DB$27,0)=2

Explanation

RANK

Returns the rank of a specified value in a dataset