Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 21-03-2009
Member
 
Join Date: Mar 2009
Posts: 2
question Auto-populate a MS Word table cell with text from a diff cell?

I have a table with three columns. Is it possible to "program" the cells of the 2nd and 3rd columns to contain exactly the same text from the cells of the 1st column? I'm looking for a way to do this without copying and pasting. The 1st column will be updated frequently, and the 2nd and 3rd need to automatically update themselves to match. Is this something I would use cell References for? I'm unfamiliar with how they work. Thanks.
Reply With Quote
  #2  
Old 21-03-2009
Member
 
Join Date: May 2008
Posts: 4,829
Re: Auto-populate a MS Word table cell with text from a diff cell?

However, to pull data from another table based on a user's selection, you would often use a recordset:

Dim rst As ADODB.Recordset

Set rst = New ADODB.Recordset
rst.Open "SELECT Name, Serial, Contact FROM Borrowers WHERE Name='" & Me.YourSearchBox & "'", CurrentProject.connection

IF Not(rst.EOF and rst.BOF) Then
Me.ctlName = rst("Name")
Me.ctlSerial= rst("Serial")
Me.ctlContact=rst("Contact")
End If

Set rst = Nothing

Of course, you'll need to change the names of your controls (the Me.ctlName, etc) to match your project.

Also, "Name" is a reserved word in Access.
Reply With Quote
  #3  
Old 21-03-2009
Member
 
Join Date: May 2008
Posts: 4,565
Re: Auto-populate a MS Word table cell with text from a diff cell?

You can follow the follwoing step to copy 1st column to 2nd & 3rd with futher assistence.....!

1. First fill the first column with the data you want.
2. Then select the column till there that you want to copy to other column.
3. Then move your mouse to the right end corner of the selected part of column.
4. You will see the black mini box at the select right down corner of the column .
5. Click & drag left mouse button to the columns you want to copy that same content.

Was this helpfull to you REPLY....!
Reply With Quote
  #4  
Old 21-03-2009
Member
 
Join Date: May 2008
Posts: 4,565
Re: Auto-populate a MS Word table cell with text from a diff cell?

Select the cell B1 which contains the formula =C1+D1. Highlight the formula in the formula bar and enter Ctrl+C to copy the formula to the clipboard. Leave the formula bar by pressing Esc or Enter or Cancel (clicking the X to the left of fx on the formula bar).

Select cell D3 and press Ctrl+V to paste the formula into cell D3.
Reply With Quote
  #5  
Old 21-03-2009
Member
 
Join Date: May 2008
Posts: 4,339
Re: Auto-populate a MS Word table cell with text from a diff cell?

You can try this method - the method simply performs copy and paste using VBA code.
Consider the sample code - the code finds the last row in Column A and copies the cell to L1. You can change it acoording to your needs accordingly...

Code:
Private Sub Workbook_Open() 
     
    Range("A1").End(xlDown).Select 
    Selection.Copy 
    Range("L1").Select 
    ActiveSheet.Paste 
    Range("A1").Select 
    Application.CutCopyMode = False 
    UserForm.Show 
     
End Sub
This codes runs as soon as the worksheet opens and it has worked for over a year.
Reply With Quote
  #6  
Old 23-03-2009
Member
 
Join Date: Mar 2009
Posts: 2
star Re: Auto-populate a MS Word table cell with text from a diff cell?

Thanks for your replies, guys, but most of what you've suggested goes way over my head. I received a couple different suggestions in another forum, that have successfully solved my problem.

Last edited by Yogesh : 24-03-2009 at 08:31 AM. Reason: External link removed
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Auto-populate a MS Word table cell with text from a diff cell?"
Thread Thread Starter Forum Replies Last Post
Applying absolute cell referencing to many cell in Excel Nyota MS Office Support 2 24-02-2012 07:23 PM
How to paste Word Table Cell along with paragraph markers in Microsoft Excel Mayuus MS Office Support 2 17-02-2012 08:09 PM
How to restore cell gridlines lost after coloring the cell in Excel? Chitti's Windows Software 2 04-01-2012 06:54 PM
*HELP* MS Word 07 - Populate a text field based on drop-down list selection klutzington Software Development 1 09-09-2011 03:38 PM
How to populate a merged cell from a form in excel SoConfused Windows Software 1 09-06-2009 08:35 PM


All times are GMT +5.5. The time now is 11:36 AM.