View Single Post
 
Old 12-12-2019, 01:27 PM
qubie qubie is offline Windows 7 64bit Office 2007
Novice
 
Join Date: Aug 2016
Posts: 24
qubie is on a distinguished road
Default

Greetings,

I have been working with the above code (a) to understand it and (b) to coax it or something like it to work with an additional wrinkle. I have been researching and working on the latter for a couple of weeks. No success.

Records I am working with look something like this very random example:

* * * *

§ 1. By unanimous-consent, agreement was reached on providing megaphones for antelopes.
Research Refs Bruce Wayne, of Gotham, was nominated to be Ambassador to the Russian Federation, and That Guy's Cats, of Texas, to be Commissioner of Food and Drugs, Department of Health and Human Services, and Aurelia Skipwith, of Indiana, to be Director of the United States Fish and Wildlife Service . . . .

§ 2. Committee on Armed Services: . . . both of the Department of Defense.

* * * *

I am trying to make the code search for multiple, optional "key word" end points for oRngE.

In the above example, for instance, I intend for the range selected for deletion to end with That Guy's Cats, rather than at the next § symbol.

For each occurrence of Research Refs in my records, an instance of That Guy's Cats may appear thereafter and before the next §; sometimes, however, the phrase That Guy's Cats does not show up between the two.

It appears to do no good for me to define two ranges in separate "With" structures, and search for the respective "key words" in successive order. That will delete more text than I intend to remove.

I have wrestled with Do ... While, and I tried nested If ... Then ... Else structures.

My coding ideas look (and also work) like something left behind by That Guy's Cats.


The snag that I cannot unravel is how to look for That Guy's Cats within the already-defined range that starts with Research Refs and ends with §.

With thanks and regards,

Q.
Reply With Quote