How to Find If the Specified Column Is the Maximum in the Corresponding Group and Fill the Result in a New Column

Problem description & analysis

Below is an Excel file book1.xlsx:

..

The original data is out of order. We need to find the record with the latest DATE in each group of FRUIT, mark it as TRUE and mark the other records in this group as FALSE. Below is the expected result:

..

Solution & explanation

 Load add-in ExcelRaq.xll in Excel, and 

Enter the following formula in cell H1: =esproc("=?1.select(~(1)==?2).max(~(2))==?3",$A$2:$B$6,A2,B2). Write similar formulas in other cells to get results.

Q & A Collection

https://stackoverflow.com/questions/63703382/set-condition-based-on-duplicate-and-date