Obviously the output total won't always be evenly divisible by 3 and the first 2 totals might need to be rounded up with the remainder in the 3rd column.
Do you mean that, if eg there are 20 results, you get 6 rows of 3, then a last row row with blank, x, y?