For experts only: how to copy-paste from Excel to PowerPoint, AND NOT LOSE PowerPoint TABLE FORMAT?

niccoflo

New Member
Joined
Jun 11, 2016
Messages
13
Hello,

the problem is simple but there is no online solution. Is there a VBA code that I can apply to power point or excel that allow me to:

- Copy a table from Excel
- Paste it in a Previously Formatted Power Point table

In other words, I already have a huge table in Power Point that is already formatted (in size, cells margins, colours, and so on) and I only need to copy-paste the Excel values into such table, without losing Power Point table format.

Thanks a lot
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
I'm not an expert, but....
Rich (BB code):
home tab paste button use destination styles. not edit paste special
AND as we don't know what version of Excel, PowerPoint and the platform you are using.
Please update your details so experts can identify the type of answer to provide 1
 
Upvote 0
This is the correct syntax to write value 50 to a cell in a powerpoint table
ActivePresentation.Slides(2).Shapes(1).Table.Cell(2, 2).shape.TextFrame.TextRange.Text = 50

One way would be to loop through all the cells in the Excel table and write the values to the equivalent cell in your powerpoint table
Pseudo code
Rich (BB code):
For each r(ow) in exceltable
for each c(olumn) in exceltable
   ActivePresentation.Slides(2).Shapes(1).Table.Cell(r, c).Shape.TextFrame.TextRange.Text = exceltable.cells(r , c).Value
next c
next r

Let me know if you require further help
 
  • Like
Reactions: dof
Upvote 0
I'm not an expert, but....
Rich (BB code):
home tab paste button use destination styles. not edit paste special
AND as we don't know what version of Excel, PowerPoint and the platform you are using.
Please update your details so experts can identify the type of answer to provide 1

Note that I was aware of "use destination styles", but as you might know, this does not work properly, and you can try it yourself :)
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,267
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top