Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2015, 12:50 AM
ShailShin ShailShin is offline Copy column 1 data into Column 3 Windows 8 Copy column 1 data into Column 3 Office 2013
Novice
Copy column 1 data into Column 3
 
Join Date: Apr 2014
Posts: 2
ShailShin is on a distinguished road
Default Copy column 1 data into Column 3

Hi All,

Using word macro, I would like to copy the column 1 paragraphs with font: Calibri and size:11 into column 3 of same table. This needs to be repeat for all the tables in active document.



Can you please provide any reference or sample code for this.

Thanks in Advance,
ShailShin
Reply With Quote
  #2  
Old 06-18-2015, 10:49 AM
theoxskyl theoxskyl is offline Copy column 1 data into Column 3 Windows 7 64bit Copy column 1 data into Column 3 Office 2013
Novice
 
Join Date: Jun 2015
Posts: 5
theoxskyl is on a distinguished road
Default

Hello,
As I understand, you need to copy all the cells of the 1st column to the cells of the 3rd column. The macro is quite simple.

Code:
Sub copy_col1_to_col3()
    Dim t As Table
    Dim r As Row
    
    For Each t In ActiveDocument.Tables
        For Each r In t.Rows
            If r.Cells(1).Range.Font.Name = "Calibri" And r.Cells(1).Range.Font.Size = 11 Then
                r.Cells(3).Range = r.Cells(1).Range
            End If
        Next
    Next
End Sub
Best regards,
Theocharis
Reply With Quote
Reply

Tags
word macros

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy column 1 data into Column 3 documents saved with double column revert to single column when re-opened danw Word 6 04-08-2015 06:24 AM
Copy column 1 data into Column 3 Embedded Excel in Powerpoint - custom animation, display column by column andytheanimal PowerPoint 2 01-20-2015 06:30 AM
Copy column entries on value Guloluseus Excel 3 01-05-2015 08:28 PM
How can I temporarily break a 3 column format in order to type a single column paragraph William P Word 1 01-04-2015 06:40 PM
Want a quotient using a constant to show up in column c each time a number is added to column b fibbermcghee Excel 2 12-09-2014 05:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:08 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