Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2015, 03:57 PM
pvh pvh is offline Can I repeat or self-populate cells/tables? Windows 7 64bit Can I repeat or self-populate cells/tables? Office 2010 64bit
Novice
Can I repeat or self-populate cells/tables?
 
Join Date: Apr 2015
Posts: 4
pvh is on a distinguished road
Default Can I repeat or self-populate cells/tables?

Context: I use a template to create a menu for a buffet on a daily basis, so I have a table (6 columns) on slide one and two. Slide 2 must be the inverse of slide 1. ie


slide one: 1, 2, 3, 4, 5 ,6
slide two: 6, 5, 4, 3, 2, 1

As of now I am copying and pasting indvidual cells, but I would love to have a way I could have it self-populate, as in slide 2 cell 6 =slide 1 cell 1. I'm working on just transferring it to a xls, where that's easy, but it's not as clean aesthetically. Any tips appreciated.

Bonus question: When I copy and paste from word, it pastes in white (the background color) text. I have already looked at the default pasting properties.
Reply With Quote
  #2  
Old 04-14-2015, 12:12 PM
JohnWilson JohnWilson is offline Can I repeat or self-populate cells/tables? Windows 7 64bit Can I repeat or self-populate cells/tables? Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

The only way would be with code. Is this something you might tackle?

This would be a basis:

Code:
Sub chex()
Dim tbl1 As Table
Dim tbl2 As Table
Dim L As Long
For L = 1 To ActivePresentation.Slides(1).Shapes.Count
If ActivePresentation.Slides(1).Shapes(L).HasTable Then
Set tbl1 = ActivePresentation.Slides(1).Shapes(L).Table
Exit For
End If
Next L
For L = 1 To ActivePresentation.Slides(2).Shapes.Count
If ActivePresentation.Slides(2).Shapes(L).HasTable Then
Set tbl2 = ActivePresentation.Slides(2).Shapes(L).Table
Exit For
End If
Next L
For L = 1 To 6
tbl2.Cell(1, L).Shape.TextFrame2.TextRange = tbl1.Cell(1, 6 - L + 1).Shape.TextFrame2.TextRange
Next
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 04-17-2015, 02:48 PM
pvh pvh is offline Can I repeat or self-populate cells/tables? Windows 7 64bit Can I repeat or self-populate cells/tables? Office 2010 64bit
Novice
Can I repeat or self-populate cells/tables?
 
Join Date: Apr 2015
Posts: 4
pvh is on a distinguished road
Default No Speaky code

Thank you for the help. It means nothing to me though as I have no idea how to use it. Appreciate the attempt though.


Quote:
Originally Posted by JohnWilson View Post
The only way would be with code. Is this something you might tackle?

This would be a basis:

Code:
Sub chex()
Dim tbl1 As Table
Dim tbl2 As Table
Dim L As Long
For L = 1 To ActivePresentation.Slides(1).Shapes.Count
If ActivePresentation.Slides(1).Shapes(L).HasTable Then
Set tbl1 = ActivePresentation.Slides(1).Shapes(L).Table
Exit For
End If
Next L
For L = 1 To ActivePresentation.Slides(2).Shapes.Count
If ActivePresentation.Slides(2).Shapes(L).HasTable Then
Set tbl2 = ActivePresentation.Slides(2).Shapes(L).Table
Exit For
End If
Next L
For L = 1 To 6
tbl2.Cell(1, L).Shape.TextFrame2.TextRange = tbl1.Cell(1, 6 - L + 1).Shape.TextFrame2.TextRange
Next
End Sub
Reply With Quote
  #4  
Old 04-18-2015, 01:30 AM
JohnWilson JohnWilson is offline Can I repeat or self-populate cells/tables? Windows 7 64bit Can I repeat or self-populate cells/tables? Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Maybe easier than you think. Here's a screencast of how to do it.

http://screencast.com/t/WRSo4farCpRd
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #5  
Old 05-04-2015, 02:40 PM
pvh pvh is offline Can I repeat or self-populate cells/tables? Windows 7 64bit Can I repeat or self-populate cells/tables? Office 2010 64bit
Novice
Can I repeat or self-populate cells/tables?
 
Join Date: Apr 2015
Posts: 4
pvh is on a distinguished road
Default Thank you!

John, thank you so much for the response and video. I didn't see it until now. I looks as though I may oversimplified my needs thinking it would be an easier solution than originally though.

My menu currently consists of 3 sections, each section requires 2 opposite slides. I have attached a template and tried to represent which items go where with numbers and letters. Let me know if this makes sense.

I tried to recreate your screen cast, but I think because of the difference in number of slides etc, it didn't work. I tried to change the (6) to a (5) in the first slide but that didn't seem to work.

Really appreciate your help. Not sure whether it's easier to try to explain your code, in which case I might be able to fill in the blanks for the other sections. Also, doesn't need to be perfect, if it completed even most of the cells automatically it would save me a lot of time. THANKS AGAIN!!!
Attached Files
File Type: pptx Menu template.pptx (62.4 KB, 8 views)
Reply With Quote
  #6  
Old 05-05-2015, 07:49 AM
JohnWilson JohnWilson is offline Can I repeat or self-populate cells/tables? Windows 7 64bit Can I repeat or self-populate cells/tables? Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

That would need different code.

Example here
Attached Files
File Type: pptm Menu template.pptm (66.1 KB, 10 views)
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #7  
Old 05-05-2015, 03:21 PM
pvh pvh is offline Can I repeat or self-populate cells/tables? Windows 7 64bit Can I repeat or self-populate cells/tables? Office 2010 64bit
Novice
Can I repeat or self-populate cells/tables?
 
Join Date: Apr 2015
Posts: 4
pvh is on a distinguished road
Default

John,

You're a gentleman and a scholar! Not to mention an powerpoint WIZARD. This seems to work about as well as one could ask for.

However... if one wanted to be nit-picky... they perhaps could ask if there was a way for the formatting to carry over as well? For some reason, not only when I run this code, but also when I copy from word or elsewhere and paste into a blank cell it automatically pastes in white font (I have already looked at the default paste settings). Any ideas?? Or am I just getting greedy at this point.

I have a quick question about mailing labels too if you feel like attacking that as well.

THANKS!!!!
Reply With Quote
Reply

Tags
paste options, tables

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I repeat or self-populate cells/tables? Auto repeat selected cells from tables into a summary AdieReeves Word Tables 7 10-22-2014 07:59 AM
Populate Cells with info contained in other cells EC37 Excel Programming 8 07-16-2014 10:55 AM
Can I repeat or self-populate cells/tables? Can I pre-populate cells with a formula? Box Excel 1 05-03-2014 11:55 PM
Repeat formula 5 times and repeat? Jenny345 Excel 4 06-14-2013 04:37 PM
Populate cells in Word from a database hotlilshan Word 3 12-09-2008 01:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:16 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft