=$B2=MAX(IF(MONTH($A2)=MONTH($A$2:$A$252…
This formula works perfectly for each month, but how do I make it do it by year and month?
Right now, it just highlights the max in the highest month of all years combined. I have about 2600 lines I have to highlight each max and min value for each month of each year.
Try using TEXT function, e.g. like this
=B2=MAX(IF(TEXT(A$2:A$2600,"mm-yyyy")=TEXT(A2,"mm-yyyy"),B$2:B$2600))