+ Reply to Thread
Results 1 to 3 of 3

Help with Loops

  1. #1
    Registered User
    Join Date
    06-13-2011
    Location
    Boulder, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    61

    Help with Loops

    I am writing a macro that has to sort and display selected data depending on certain criteria. The data is tab delimited and sorted by trajectory number which is equivalent to the cell number. However, each cell also reports x and y coordinates via frame number as well. I'm trying to sort the x and y coordinates by frame number and then test them in relation to a given cell to see if they are close enough to be considered neighbors. I have an array formula that will report all x coordinates of frame 1 and I can easily modify this to report the coordinates for any frame but I'd like to create a loop that will do it for all frames no matter the number. I know this is not the most efficient way to accomplish what I want but at this point it is the only option I'd come across so any help would be greatly appreciated.

    My code to display the coordinates for frame one is as follows:
    Please Login or Register  to view this content.
    Once again I'd just like to loop this so it will do it for all frames present in the data set. I've uploaded a sample of what the raw data looks like before any macros have been run.
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Help with Loops

    Hello Impartial Derivative,

    It would help to see what the desired output is as well.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-13-2011
    Location
    Boulder, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Help with Loops

    Quote Originally Posted by Leith Ross View Post
    Hello Impartial Derivative,

    It would help to see what the desired output is as well.
    Leith,

    Here is a very brief example of an output file. I'm not concerned with the formatting so don't make that a priority. I am mostly concernced with the efficiency of the macro as it incorporates arrays and loops.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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