+ Reply to Thread
Results 1 to 5 of 5

Extract Data From A Large Range Using VBA

  1. #1
    Registered User
    Join Date
    10-15-2013
    Location
    Peterborough, United Kingdom
    MS-Off Ver
    Professional Plus 2010
    Posts
    3

    Extract Data From A Large Range Using VBA

    Hi,

    I've been trying to find a means of doing this all afternoon but I'm struggling to find something that meets my requirement.

    Basically I have a spreadsheet which has a very large number of rows (upwards of 900,000) and approx 5-6 columns. The first column contains a reference number in the format 12345/123 and what I'm trying to do is poll the first column looking for instances of a specific reference and, when found, to extract all the columns for that row and write them away as an object.

    The thing I'm struggling with is polling the data and extracting the requisite columns - I can do it with a counter which iterates and reads through every cell in the column but this seems a very unoptimised way of doing it and takes far too long. Is there something I can do using range to quickly poll the first column and I can then either call a function or process some code when it finds one which will lift the accompanying data?

    Thanks in advance.

  2. #2
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Extract Data From A Large Range Using VBA

    Hi Paul,

    When you say you'd like to write them away as an object what do you mean?

  3. #3
    Registered User
    Join Date
    10-15-2013
    Location
    Peterborough, United Kingdom
    MS-Off Ver
    Professional Plus 2010
    Posts
    3

    Re: Extract Data From A Large Range Using VBA

    I think I've just seen something that I can adapt to do what I need :

    Please Login or Register  to view this content.
    I can pull the data from this point - I think the report will always sort by reference number so I can at least stop it once the reference no longer matches rather than continue polling the whole lot.

    Sods law - the minute I post asking I see something

  4. #4
    Registered User
    Join Date
    10-15-2013
    Location
    Peterborough, United Kingdom
    MS-Off Ver
    Professional Plus 2010
    Posts
    3

    Re: Extract Data From A Large Range Using VBA

    Quote Originally Posted by RichTea88 View Post
    Hi Paul,

    When you say you'd like to write them away as an object what do you mean?
    Hi Mate,

    That might have been the wrong syntax but basically once I find the correct row I'm going to lift all the data in that row and store it for processing down the line.

    I'm still open to better/more efficient ways if anybody has one!

  5. #5
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Extract Data From A Large Range Using VBA

    Not sure if this will help,

    but if you create a sheet called search results this code will allow you to enter the reference number in format xxxxx/xxx and then finds any results with it and stores it in the search results sheet, from columns A to E.


    Please Login or Register  to view this content.
    This bit of code clears the previous results you've found. If you don't want to do that you can get rid of it.
    Please Login or Register  to view this content.

+ 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 to extract a small range from a large one based on cell value
    By Ahmed Abodorra in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-17-2013, 09:20 PM
  2. Extract Data from large Column
    By gregpl in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 08-13-2013, 12:56 PM
  3. [SOLVED] Extract data that meets specific condition from large raw data
    By tekobayashi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-27-2012, 03:50 AM
  4. extract specific data from large data set
    By skaizla in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 08-10-2012, 04:02 PM
  5. Extract data in large dagtabase
    By firsttobecool in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2012, 03:05 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