Conditional Formatting Question

Mitch21

New Member
Joined
May 2, 2018
Messages
14
Hello,

I want to conditionally format the highest value in a row. However, I only want to highlight the most recent occurrence of that value. For instance, in the table below, I only want to highlight the 6 that occurred on 4/21/2018, not the one that occurred on 3/31.

When I try to write a formula to conditionally format, it highlights both instances. Can anyone help?

4/28/20184/21/20184/14/20184/7/20183/31/20183/24/20183/17/20183/10/2018
46456434

<tbody>
</tbody>
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Welcome to Mr Excel forum

Dates as dd/mm/yyyy

A
B
C
D
E
F
G
H
1
28/04/2018​
21/04/2018​
14/04/2018​
07/04/2018​
31/03/2018​
24/03/2018​
17/03/2018​
10/03/2018​
2
4​
6​
4​
5​
6​
4​
3​
4​

<tbody>
</tbody>


Try
Select A2:H2 being A2 the active cell
Use this formula in CF
=AND(A2=MAX($A2:$H2),COUNTIF($A2:A2,MAX($A2:$H2))=1)
pick the format you want (fill-->yellow in the example)

Hope this helps

M.
 
Last edited:
Upvote 0
How would the formula change if I wanted to highlight only the first instance of the 6? The one that occurred in column E?
 
Upvote 0
How would the formula change if I wanted to highlight only the first instance of the 6? The one that occurred in column E?
You just need to tweak Marcelo's formula slightly

=AND(A2=MAX($A2:$H2),COUNTIF(A2:$H2,MAX($A2:$H2))=1)
 
Upvote 0
How would the formula change if I wanted to highlight only the first instance of the 6? The one that occurred in column E?

The one in column E is not the first instance, Do you mean the last instance?

EDIT: Peter has already provided a solution to highlight the last instance.

M.
 
Last edited:
Upvote 0
Actually, both formulas could be simplified a bit.
Original problem
=AND(A2=MAX($A2:$H2),COUNTIF($A2:A2,A2)=1)

Latest problem
=AND(A2=MAX($A2:$H2),COUNTIF(A2:$H2,A2)=1)
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,020
Members
448,939
Latest member
Leon Leenders

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top