searching text in a table

A

Aud

i'm having a hard time trying to search a table for a certain line of text.
i'm trying to insert a row beneath each row of a table that contains "auto".
i'd appreciated any help.

Thanks!
 
A

Aud

i'm not sure what function i can use after i locate the cell i want to
search. is there a function to search the contents of a table, can i assign
the contents of a cell to a string?
 
J

Jezebel

You can restrict a search to any range of the document, including a table.
If you're working manually, select the table before calling Find. If you're
talking about VBA, provide the table as the Range argument to the Find
object.

Yes, you can assign the content of a cell to a string:

pString = MyTable.Cell(Row, Col).Range

Bear in mind that every table cell terminates with chr(13)chr(7); you might
need to strip these from the end of the string.
 
Top