Macro to Delete Tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a word document linked to and excel document. I have tables in the
word document that represent data in the excell document. I would like it if
the cell says no or n/a, that the table would be deleted from the word
document so I can minimize the number of pages and only have the yes
responses.

Can someone assist me in creating a marco for this?

thank you,

Daniel R. Young
 
Hello Daniel,

Since you're using a linked Excel worksheet, why not hide/delete the rows
that meet your criteria in Excel itself? If you name the source range in
Excel, then use that name in the Word link, the results in Word will carry
over the same appearance (i.e. hidden/deleted rows in Excel will be
hidden/deleted in Word too).

In answer to your question, if you embed an Excel worksheet, as opposed to
linking to one, then it is possible to hide or delete rows that meet your
criteria just as you can in Excel. But, with the worksheet no longer linked,
updates in Excel won't automatically be reflected in Word.

Cheers
 
Back
Top