+ Reply to Thread
Results 1 to 2 of 2

VBA to loop through points

  1. #1
    Registered User
    Join Date
    03-12-2015
    Location
    Illinois
    MS-Off Ver
    2013
    Posts
    22

    VBA to loop through points

    Hi Guys, I know I'm a newbie but is there anyone out there who can help me? I used some code from another thread to create all the possible combinations of points and am working off of that, but I feel like there is an easier way.

    I have attached my spreadsheet as a reference.

    I was wondering if there is a way to keep a stationary (x1, y1) and loop through all of the (x2, y2) values, then move onto the next (x1, y1) and loop through all of the (x2, y2) values until I am done with all of my (x1, y1) points. This is mostly like a taxicab geometry problem but I am having an issue finding a simple way to loop with out changing my (x1, y1) values by hand.

    My goal is to find the combination that gives me the 3 smallest sums overall. All sums would need to be stored on another spreadsheet I assume but I would need to be able to reference which combination of points gave me my smallest sums. RioRancoDemand.xlsx
    Last edited by meghs918; 03-22-2015 at 05:34 PM.

  2. #2
    Registered User
    Join Date
    03-12-2015
    Location
    Illinois
    MS-Off Ver
    2013
    Posts
    22

    Re: VBA to loop through points

    I have been able to create a list of all possible (2500) combinations of the points. This was done with help from the Cartesian product code I found in another post here. I am now working on applying each part of my formula into smaller pieces of code. Not sure if anyone has looked at this or not.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 04-09-2014, 01:33 PM
  2. Loop through data points and change color based on label
    By rodrignj in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2013, 09:38 AM
  3. Loop through data points and change color
    By harleyberger in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2012, 01:33 AM
  4. Loop Through Points in a chart
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2011, 10:54 AM
  5. Loop breaks at different points
    By nhandal in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-04-2009, 01:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1