+ Reply to Thread
Results 1 to 12 of 12

reduce the time to lookup value

  1. #1
    Registered User
    Join Date
    04-21-2015
    Location
    HK
    MS-Off Ver
    2007
    Posts
    40

    reduce the time to lookup value

    Hi all,

    Recently i am facing 500k pieces of rows of data,
    which every row consists of around 20 columns.


    Normally we use index,match or vlookup or loop to get the data link together.

    I am thinking is there a better way to shortern time to find every single of data by loop ,whatever.

    May be according to the reference key, and do the sorting, and kick the useless data out from the extraction?

    Attached is my example worksheet.
    Hope guys can help me with this annoying problem...
    Always work overnight.


    Regards,
    matthew
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: reduce the time to lookup value

    Looks like you just want to delete columns
    DFGIK

    in which case

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by humdingaling; 07-02-2015 at 10:13 PM. Reason: file attached
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    04-21-2015
    Location
    HK
    MS-Off Ver
    2007
    Posts
    40

    Re: reduce the time to lookup value

    No, i have to vlookup the key, and get the whole row of data, afterall then kick out the data by using your method.

    Please Login or Register  to view this content.
    after sorting, i can match the reference key with two sheets, then copy the whole row and follow your instructions delete the column

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: reduce the time to lookup value

    sorry do not get what you are trying to do

    cannot see the correlation to what you have as the code you have just pasted and the expected results tab you have in your example

    why would you need to vlookup if you copy the raw data in the state and filter out lines you dont want or just sort the way you want afterwards?

  5. #5
    Registered User
    Join Date
    04-21-2015
    Location
    HK
    MS-Off Ver
    2007
    Posts
    40

    Re: reduce the time to lookup value

    sorry for messy..
    the first priority is i have to make sure the reference key must be the same, then extract the data from the behind columns,
    sorting is a good way to eliminate time, but not 100% sure that i can link the data with the reference key correctly.

    For example:
    A 100
    D 200
    DD 2000
    C 300
    E 500
    EE 600

    expected result ( after sorting of col A, in order to minmize the calculation time of excel)
    A 100
    C 300
    D 200
    E 500
    DD 2000
    EE 600

    copy after sorting is good, but i cant guarantee the sorting must be correct to link the data.
    If the sorting goes wrong as not expected,
    and became this

    A
    C
    D
    DD
    E
    EE

    just copy the data behind is taking a risk..
    i want to minimize the time with linking the reference like vlookup to make sure the accuracy of data. i only can think of sorting in order to minimize the "looking for" time of excel.

    And wanna ask for a better solution.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: reduce the time to lookup value

    See if this is faster
    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: reduce the time to lookup value

    Missed
    If I got 500 k rows of data, they are too slow to being vlookup, index,match as formula…
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-21-2015
    Location
    HK
    MS-Off Ver
    2007
    Posts
    40

    Re: reduce the time to lookup value

    Quote Originally Posted by jindon View Post
    Missed

    Please Login or Register  to view this content.
    Yes, Thank you Sir, It did work perfectly!!

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: reduce the time to lookup value

    not sure if this method is any quicker than jindon's but since i already made it might as well post
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-21-2015
    Location
    HK
    MS-Off Ver
    2007
    Posts
    40

    Re: reduce the time to lookup value

    another bravo job!

    quite interesting method to deal with this prob.!!!
    Thank you guys!

  11. #11
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: reduce the time to lookup value

    thanks
    i just reverse engineered what i would do if i didnt have vba
    its probably not the best way but its the way i understand how things work....most of the time

    also im nowhere near as goods as jindon with arrays

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: reduce the time to lookup value

    I like the way how you attack the problem... good work.

+ 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. Hi, can I use an If statement or V lookup to reduce mutiples lines to one
    By graemebc in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-05-2015, 09:25 AM
  2. Replies: 4
    Last Post: 01-23-2015, 09:30 AM
  3. [SOLVED] Reduce Macro Time
    By pezalmendra in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-24-2012, 12:31 PM
  4. Reduce Macro Time
    By matt9man in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-05-2011, 03:01 PM
  5. how do I reduce calculation time?
    By Dora C in forum Excel General
    Replies: 14
    Last Post: 09-15-2008, 03:05 AM

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