Set borders for range

Hi, i have range A7:AQ (I don’t know the end row because it is different every time) and I have to set borders for that range, how can I do that?

Hello,
Try to find the nr of rows of the datatable that you will write and so you can find the last row.