+ Reply to Thread
Results 1 to 5 of 5

Fastest way to match longitutdes and latitudes, thousands of data points

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Fastest way to match longitutdes and latitudes, thousands of data points

    Hello all,

    I am really new to programming in VBA and Excel, but have a lot of experience in C++ and Matlab. I have thousands (anywhere from 20,000 to 500,000) of data points to match using latitude and longitude (two columns against two columns), and then must export those matching points and their other associated values into two new columns in order to run analysis on the acceleration values. Each "row" of data contains 8 columns, so my smallest file size is 2 x 8 x 20,000 filled boxes (320,000 boxes). I have written a For/Next code that works on small files (around 200 rows each), but am just trying to find the easiest method to actually match the data without crashing this cheaper computer.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Fastest way to match longitutdes and latitudes, thousands of data points

    Hi Oredigger90 and welcome to the forum,

    I just answered a question with Advanced Filters and think that will work here too. NO VBA needed and you can copy the resulting matches to a different part of a sheet.

    See http://www.contextures.com/xladvfilter01.html

    If you need more examples then attach a sample with some data and what you want to find and we can show you how to do it.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    08-27-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Fastest way to match longitutdes and latitudes, thousands of data points

    My formula was the following, but will not run quickly so I will try your solution:

    Please Login or Register  to view this content.
    'Also, I was wondering if VLOOKUP would be a viable solution? I haven't used it and don't really know how, but I will try. I have also posted some example data, only the matching latitudes and longitudes should be copied into a separate sheet next to eachother.
    Attached Files Attached Files
    Last edited by Cutter; 08-28-2012 at 02:04 PM. Reason: Added code tags

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Fastest way to match longitutdes and latitudes, thousands of data points

    @ Oredigger90

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  5. #5
    Registered User
    Join Date
    08-27-2012
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: Fastest way to match longitutdes and latitudes, thousands of data points

    I have matched the points using =iferror(match(),0) and deleting all rows of zeros, and after a lot of copy/pasting, have got them into the columns shown in my attached example. I wrote a code that successfully matches them into their particular latitudes and longitudes, but it crashes my computer lol. So if there is a simpler solution than I am seeing, please help.
    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)

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