View Single Post
 
Old 03-04-2020, 08:58 AM
qubie qubie is offline Windows 7 64bit Office 2007
Novice
 
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