Home » excel » Linking an Excel table with a changing row-count into a PowerPoint slide

Linking an Excel table with a changing row-count into a PowerPoint slide

Posted by: admin May 14, 2020 Leave a comment

Questions:

The issue that I am having is when I copy my table in excel(which is generated from running a query) and then special paste it into a power point slide.

The paste works but when I run the query in excel with different parameters it brings back a varying number of rows. The table in the slide will update using the same number of row from the original copy/paste. If the table grew it will only have up the the original number of rows, if it shrinks i get this.
The data is removed but the rows are still there

How to&Answers:

I found an answer on answers.microsoft.com.


The key is to create a named range and you have to use a workaround if your named range is an Excel table. I’ll cover this workaround.

Let’s say that you have a query that returns a table named DataTable. If you want to link to this table in PowerPower, first you’ll need to create a named range that does not directly refer to a table.

Create a new Named Range under Formulas > Name Manager and name it TableAlias with a formula referencing a specific range, e.g., =Sheet1!$A$1.

Once you’ve created this alias, save the file and then paste the range referenced by your named range reference (Sheet1!$A$1, not the table you eventually want) into your PowerPoint slide using Home > Paste > Paste Special… > Paste Link > Microsoft Excel Worksheet Object. If things are working correctly at this point, you should be able to go to File > Edit Links to Files and see that the link is using the named range instead of an R1C1 range.

Now that it knows to use the named range, let’s change the formula for TableAlias in the Name Manager to the range we actually want to link, =DataTable. Once the formula is updated and you’ve saved the document, the link in PowerPoint should update to this new range giving you a dynamic link to a table.


This process seems a bit finicky, but I did getting it working for me where if I added or deleted rows, then the PowerPoint slide would update the table range appropriately.