how to link cells

I

icebreaker

how to link cells in separate tables, but same document, so that anything
entered in one cell, automatically displays in second cell.
 
J

Jean-Guy Marcil

icebreaker was telling us:
icebreaker nous racontait que :
how to link cells in separate tables, but same document, so that
anything entered in one cell, automatically displays in second cell.

Use {REF} fields where you want the repeated text.

E.g: On page one, you have some text;
Assign a bookmark to that text (Insert > Bookmarks, let's call it "Text1");
Everywhere else you want the text bookmarked by Text1 to appear do:
CTRL-F9;
A pair of { } will appear;
Type REF Text1 between the curly braces;
Create all the REF fields you want.

When you are done do ALT-F9 twice to switch from field code view to regular
view.

If you are dealing with protected forms:
Again, use {REF} fields where you want the repeated text.

E.g: On page one, you have a text field named "Text1" (right click the
field, click properties, and see/change the name where it says Bookmark,
bottom right corner).
Everywhere else you want Text1 to appear do:
CTRL-F9;
A pair of { } will appear;
Type REF Text1 between the curly braces;
Create all the REF fields you want;
In the field where the text originates, make sure to check the "calculate on
exit" checkbox so that all REF fields will be updated automatically when
leaving the text fields;
Finally, do ALT-F9 twice to turn the REF fields into their values (They will
seem to disappear the first time as they will be linked to empty fields);
Lock the form;
Type some text in Text1;
See all the REF Text1 field update when you tab out of Text1.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
I

icebreaker

Thanks. All these tips helped but I could still use more advice. The
document is a test report with about 100-200 PASS/FAIL tests. In the
beginning of the report is a single table to summarize the test results.
After the summary table there are the same tests, but in individual verbose
tables.

For example, if PASS or FAIL is entered in test number 5 of the summary
table, I would like the test 5 result to be updated (PASS or FAIL) in the
test 5 verbose table.

Or if PASS or FAIL is entered in test 5 of the verbose table, I would like
the test 5 result to be updated (PASS or FAIL) in the test 5 summary.

I actually have three text entries for the results, PASS, PASS* & FAIL*. An
asterisk indicates comments about the test are included in the document.

Additionally I would like to export my PASS/FAIL test results from the Word
Doc to an Excel spreadsheet.

Thanks for your help!
 
I

icebreaker

Also, the document form must remain unlocked.

icebreaker said:
Thanks. All these tips helped but I could still use more advice. The
document is a test report with about 100-200 PASS/FAIL tests. In the
beginning of the report is a single table to summarize the test results.
After the summary table there are the same tests, but in individual verbose
tables.

For example, if PASS or FAIL is entered in test number 5 of the summary
table, I would like the test 5 result to be updated (PASS or FAIL) in the
test 5 verbose table.

Or if PASS or FAIL is entered in test 5 of the verbose table, I would like
the test 5 result to be updated (PASS or FAIL) in the test 5 summary.

I actually have three text entries for the results, PASS, PASS* & FAIL*. An
asterisk indicates comments about the test are included in the document.

Additionally I would like to export my PASS/FAIL test results from the Word
Doc to an Excel spreadsheet.

Thanks for your help!
 
J

Jean-Guy Marcil

icebreaker was telling us:
icebreaker nous racontait que :
Thanks. All these tips helped but I could still use more advice. The
document is a test report with about 100-200 PASS/FAIL tests. In the
beginning of the report is a single table to summarize the test
results. After the summary table there are the same tests, but in
individual verbose tables.

For example, if PASS or FAIL is entered in test number 5 of the
summary table, I would like the test 5 result to be updated (PASS or
FAIL) in the test 5 verbose table.

Or if PASS or FAIL is entered in test 5 of the verbose table, I would
like the test 5 result to be updated (PASS or FAIL) in the test 5
summary.

You can't have it both ways. One of them has to be the source.
Up to you to choose which makes more sense according to your context.
I actually have three text entries for the results, PASS, PASS* &
FAIL*. An asterisk indicates comments about the test are included in
the document.

Additionally I would like to export my PASS/FAIL test results from
the Word Doc to an Excel spreadsheet.

If you set up the summary as a table, it will be easy to export it to Excel
as is.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
I

icebreaker

I have an unprotected document and I choose the verbose tables as the source.
After each test is completed, the PASS, PASS* or FAIL* result is updated in
the document for that test. The PASS, PASS* or FAIL* choice remains the
same, but each test (100 to 200 tests) must be updated individually.

Do you have advice on how to update over 100 summary tests individually with
PASS, PASS* or FAIL? This would be easier if I could protect the document.

Thanks!
 
D

Doug Robbins

Assuming that the summary table has two columns and a heading row, with the
summary results being required in the second column, and that each of the
individual tables has two columns and a heading row with the result of the
test being entered into the Column 2 of Row 2 of the table, if you run the
following macro, it will populate the results column of the summary table
with the result of each individual test:

Dim i As Long, result As Range
For i = 2 To ActiveDocument.Tables(1).Rows.Count
Set result = ActiveDocument.Tables(i).Cell(2, 2).Range
result.End = result.End - 1
ActiveDocument.Tables(1).Cell(i, 2).Range = result
Next i

As Jean-Guy has mentioned, with the summary table populated, it can be just
a copy and paste to get it into Excel. However, using the information in
the article "Control Excel from Word" at:

http://word.mvps.org/FAQs/InterDev/ControlXLFromWord.htm

The above macro could be modified so that it populated and Excel spreadsheet
at the same time as it populated the summary table.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top