+ Reply to Thread
Results 1 to 2 of 2

SQL type things in VBA

  1. #1
    Registered User
    Join Date
    01-25-2010
    Location
    Gurgaon India
    MS-Off Ver
    Excel 2007
    Posts
    8

    SQL type things in VBA

    I have got 250,000 records and one sheet and 240,000 records in another.

    Both the sheets have same variables (column titles). One of them is "Unique ID". Other columns are "Body Weight", Height, Salary.

    In 2nd sheet, most of the records come from sheet 1, but some records are lost and some new records are added.

    What I have to do is to find all the common records, and put them into a third sheet. Also I have to copy some of the other columns as well say "body weight" and "Salary" from both the sheets. I have to calculate "difference in Body Weight" and "difference in Salary" and put them in the third sheet. Then I have to make different segments for these differences. So if the difference of Body Weight lies between 0 to 5 lbs then segment 1, between 5 to 10 then segment 2 and so on.

    Now if I take each record from first sheet, and try to find a match in 2nd sheet, it will take a lot of time as it will do 250,000 searches.
    I was wondering if something SQL like is possible here where in you can get all the common records in 1 step.

    Thanks

  2. #2
    Registered User
    Join Date
    01-25-2010
    Location
    Gurgaon India
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: SQL type things in VBA

    I was wondering if I should hope for this, I searched on internet and found ways to connect to any DBMS and run queries on that DBMS, but I could not find anything by which we can run queries on excel data itself.

+ 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