Google Sheets – How to Apply Conditional Formatting to Last Row with Similar Cell Values

google sheets

I am trying to conditionally format the last row that has similar values of sorted data based on country column. In this example of my test sheet, I'm sorting the data from A3:C18 by placing the formula in E3 =Sort(A3:C18,3,true). Then in Column G3:G18 I have the country of origin. How to conditionally format the last row of all rows that hold "Bahrain" and last row that has "UAE" and last row of "Kuwait"?

https://docs.google.com/spreadsheets/d/1D6q7IsdAIIgD-9GuMNSdLhBVDOtKniDW_cy-Td0Sq_I/edit?usp=sharing

Best Answer

https://infoinspired.com/google-docs/spreadsheet/find-the-last-row-in-each-group-in-google-sheets/

That answered my question. You add a helper column that will list the row number Then put this formula in next column and determine which column you look for similar values according to the explanation in the url.