I'm working on a spreadsheet that records logistics reports via a Google form. We have 100 locations and logistics personal visit and report on condition of each location, i.e. the location needs maintenance etc.We have 3 categories of location: Priority locations that need to be visited daily, secondary locations that need to be visited a minimum every other day, and other locations that we aim to visit a minimum of every 3 days.Each logistics visit is recorded in the spreadsheet via the form it captures:Column A = Time Stamp,  Column B = Location,  Column C = Damage Yes/No,  Column D = Damage Description,  Column E = Personnel ID,  I want to create a query that groups the entries by location so that only the last visit for each location is displayed.  And use conditional formatting relating to latest visit date to highlight:Green visited today,Amber visited yesterday,Red visited three days ago.
Query using group by but only displaying the latest entry for each item
google spreadsheets;google spreadsheets query
Query is not an option for your task, try this formula:=ArrayFormula(VLOOKUP(UNIQUE(FILTER(B2:B,B2:B<>)),QUERY(SORT(A2:E,1,false),select Col2, Col1, Col3, Col4, Col5),{2,1,3,4,5},0))