Conditional Formatting

G

Geoff Murley

I have a sheet with n columns and n rows.

For each row I would like to highlight, in yellow, the 6
cells with the highest values in that row.

I can't think of a way of doing this using the normal
conditional formatting. Is there a VBA solution?
 
J

JE McGimpsey

CF solution:

Assuming your data starts in Row 1, and n = 10, select A1:J10 with A1
active and use

CF1: Formula is =A1>=LARGE($A1:$J1,6)
Format1: <highlight color>

Note, if there's a tie for 6th largest in a row, you'll get more than 6
highlighted cells in that row.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top