+ Reply to Thread
Results 1 to 8 of 8

Creating Row Index Searching Large Data Set Work Sheets

  1. #1
    Registered User
    Join Date
    07-13-2012
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    7

    Creating Row Index Searching Large Data Set Work Sheets

    I am trying to iterate through a data set which has a large number of rows (> 200k). In the data set there is a ID column which I need to use to find values in the other columns of the data set which match that ID. I would then perform analysis on the column values for all of the row that match that ID.

    Right now I am looping through the data and creating a worksheet index to determine the worksheet rows each ID is located. I would then use that index to do a lookup for the column data based on the ID. Even on small data sets ~4k rows it takes forever to get this index created.

    I am keeping all of my information in memory so I did not want to use the advanced filtering to filter my records on the sheet and then process.

    There has got to be something I am missing get a range of data returned based on the value in the ID column.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Creating Row Index Searching Large Data Set Work Sheets

    Post your current code.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Creating Row Index Searching Large Data Set Work Sheets

    I noticed that there are duplicate ID's (2320). How do you handle the duplicate values? Also, it would help if you could explain in more detail exactly what you want to do. Explain referring to specific cells, rows and columns using a few examples from your data. What do you want to do with the data once a match has been found?
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Registered User
    Join Date
    07-13-2012
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    7

    Re: Creating Row Index Searching Large Data Set Work Sheets

    This is similar to what I am doing in the actual project. My thinking is this is faster to create an index so I can then do a direct lookup of the work sheet data. As an example one work sheet has 4000 rows but only 1500 unique IDs. So it would be faster for me to find the unique id and process the rows that it occurs in.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-13-2012
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    7

    Re: Creating Row Index Searching Large Data Set Work Sheets

    I incorporated using a dictionary object into the code and it is much quicker. If there is something else which might be a better option please let me know.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Creating Row Index Searching Large Data Set Work Sheets

    See if this makes a difference.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-13-2012
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    7

    Re: Creating Row Index Searching Large Data Set Work Sheets

    Adding the range to the array is a big help. I assumed worksheet.cells was loaded into memory.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Creating Row Index Searching Large Data Set Work Sheets

    Glad to help and thanks for rep+.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Need help searching multiple work sheets
    By mlopez60120 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-05-2018, 11:34 AM
  2. Large data sheet, searching for addresses, Macro
    By hansas01 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-18-2017, 05:07 PM
  3. Need help creating Userforms on one sheet to input data onto other sheets in the same work
    By Pimp_mentality in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2015, 07:42 PM
  4. [SOLVED] Index Match accross two sheets with two crieteria searching in multiple columns
    By EmmatheDancer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-09-2015, 11:56 AM
  5. [SOLVED] Searching and Replacing Large Files Over Two Sheets
    By jfyang13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2015, 08:22 PM
  6. [SOLVED] Creating a sorted list, using INDEX, MATCH, LARGE, COUNTIF
    By amnesiac77 in forum Excel General
    Replies: 7
    Last Post: 07-25-2014, 10:56 AM
  7. Creating buttons to select different work sheets
    By Blackfaery in forum Excel General
    Replies: 2
    Last Post: 08-15-2013, 01:15 PM

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