Hidden rows, hidden borders

The problem Below you see a little table. It has some rows, some colors, some borders, the usual. As table as a table can be. One remark: the last row has a hide-when formula on the cells, so when certain conditions are met, the row is hidden and this is how it looks...