troubleshooting Question

Procedure / Script / Macro for Creation of Lists from Data Matrix

Avatar of justearth
justearthFlag for United States of America asked on
PythonVB ScriptMicrosoft Excel
17 Comments6 Solutions516 ViewsLast Modified:
I have data contained in square matrix. The data is the distance in meters between two locations.  I'd like to create/output lists from this data matrix based on the following scheme:

- All of the locations (the numbers in the matrix) are ranked based on "Priority Level", the .1, .2 or .3 following the number indicates priority level. Any selection between any points will need to have a distance greater than 16100.  
- I would like the lists to be created "randomly" I say I have placed randomly in quotes because I want a preference given to priority level  (i.e. 1>2>3 ).
- I don't know if this is possible, but I would like to start out by "randomly" choosing a priority 1 location and then adding as many priority 1 locations, then priority 2, and finally priority 3 locations, given that all points are greater than 16100 apart, for like 50 runs.

I don't care how the data is stored ( text file, excel, csv, etc )

Does this sound plausible to do in VB macro in excel, python or VBscript. I'd be greatly appreciative of any annotated code so that I might learn what you did.

Thank you kindly,

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 6 Answers and 17 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 6 Answers and 17 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004