And if you get stuck, since it is all about rows and columns, just sketch it out in Excel.
Not using formulas in Excel but just using it as a rows/columns editor.
This makes it visually clearer.