How do I find a particular value in a table?

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

Guest

I'm looking for the function in Word that performs the same action as the
"Index" function in Excel. I have a table, and I need to find a value in a
certain range. For instance I have just one row, A1:A10, and I want to print
out whatever is in the 8th column, or A8.

Thanks.
 
There is no such function in Word. You could however use VBA, to get the
contents of a cell

Dim myrange as Range
Set myrange = ActiveDocument.Tables(1).Cell(1, 8).Range
myrange.End = myrange.End-1
MsgBox myrange 'displays to contents of cell A8 in the first table in the
document.

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

Back
Top