Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 03-04-2020, 08:58 AM
qubie qubie is offline I am trying to delete text of any format between two bold, recurring keywords or symbols Windows 7 64bit I am trying to delete text of any format between two bold, recurring keywords or symbols Office 2007
Novice
I am trying to delete text of any format between two bold, recurring keywords or symbols
 
Join Date: Aug 2016
Posts: 24
qubie is on a distinguished road
Default Figured it Out -- Sort of . . . .

I derived code that works reasonably well, but I wonder if there is a more simple or straightforward way to ring the last bell.

My goal is to isolate six possible ranges between two broader "end points" which represent the largest possible (recurring) range, to isolate the shortest range among them, delete that range, and move on to the next relevant "end points" in the record.

I can explain it best this way:

A . . . . . . . . . . . . X is the longest possible range; however, there might (or might not) be a "B" of interest between "A" and "X", as in --

A . . . . . . B . . . . . X; alternatively, there might (or might not) be a "C" of interest between "A" and "B", as in --

A . . . C . . B . . . . . X; etc.

Complicating matters, the range "A" to "C" might be longer than the range "A" to "B", or it might be shorter.

The code I derived identifies the relevant ranges beautifully, and it stores a variable defining their respective "lengths".

The elusive part has been identifying the shortest range that is not zero from among the six possibilities. To do this, I undertook a seriously complex set of inequalities that makes my head hurt. It performs acceptably.

My question is conceptual:

Is there a technique or function that can be deployed (roughly analogous to "Min" in MS Access) by which to simply detect the shortest range, not equal to zero, and delete it? If such a thing exists, I have not come upon it in researching the topic.

Thanks as always for your kind attention.

Q.
Reply With Quote
 

Tags
word vba macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am trying to delete text of any format between two bold, recurring keywords or symbols bold (or unbold) section of text instead of bold toggling Burt Word 6 04-06-2019 09:09 AM
I am trying to delete text of any format between two bold, recurring keywords or symbols Macro to delete text from cells with specific format Soenke Word VBA 4 09-01-2016 08:55 AM
Bold each line of text that starts with a recurring symbol qubie Word 6 08-26-2016 07:10 AM
I am trying to delete text of any format between two bold, recurring keywords or symbols Text in #1 is made bold, rest of the document is edited, text in #1 is now not bold footer-assistance Word 1 06-29-2015 03:49 AM
Format Bold in one line makes all lines bold Nitte Word 2 02-07-2013 12:34 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft