as you probably noticed this is because you are creating new rows based on your template's first row. Since your first table on the left has more rows the formatting is carried across to the second table too for every created row in spreadsheet (not in this first table)!
I am not sure if you could use conditional border formatting for it? like if cell is empty then no formatting - i am not an excel guru?
I might have to test it further to give you correct answer. I am suspecting it can be achieved by using tables instead of ranges in excel.
cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.