Link to home
Start Free TrialLog in
Avatar of vRisc
vRisc

asked on

VBA Word ¦ Search for contents in Table Cells and delete adjacent row.

Hello all,

How can I pinpoint the location of a Cell within a Table, and delete the row underneath it? I have vertically merged cells, and apparently the Rows collection fails.

The Cell contains a keyoword such as: "Application Domain " or "Subdomain " and I want to delete the row under the cells which contain any of these strings.

Should I look into a Macro that uses the Search Function, or somehow run through each cell of the Table?

What is a clever way of dealing with this?


Thank you very much,
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vRisc
vRisc

ASKER

That is simply great, thank you.

One last question: How can I have rngFind.Find.Execute() search for either "Application Domain" OR "Subdomain". In my table, an Application Domain can have 1 or more Subdomains.

The order it finds the rows is important, as I want to modify this code to copy the Description row together with the current Domain row to a different file.

Thanks a bunch, this was lovely.