1. Create the formula you would like to use for grouping
2. From the menu bar choose Insert and select Group
3. Select the formula from the drop down to group on that formula.