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.
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.
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....!
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.
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.
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.