Automatically resize a table based on the source data

Brass Contributor

I have a table named `Table1` which is referenced by many cells in the workbook (i.e., target file).

 

The data in `Table1` is regularly manually copy-pasted from a source file: in the source file, I select the range of data, Ctrl+C, then go to the target file, select the top left cell of `Table1`, and Ctrl+V.

 

When the copied data has more rows than existing data in `Table1`, this manipulation automatically resizes well `Table1` to a bigger table. However, when the copied data has less rows than existing data in `Table1`, `Table1` is not automatically resized to a smaller table. I have to manually resize it.

 

Does anyone know if there is better manipulation to make this copy-paste automatically resize `Table1` based on the size of the copied data?

1 Reply

You could just highlight all but 1 or 2 rows of the table, right click and select Delete table rows before you paste in the data.
That said, I would highly recommend you consider using Power Query or the Get and Transform to get the data from the external file. When the data in the external file changes you just refresh all and it will get updated. You can even use a cell in the worksheet to define the name/location of that file (for that I recommend you search for a tutorial to help).