Simplified group selection code for spreadsheet.