+ Reply to Thread
Results 1 to 9 of 9

fastest way to consolidate large data

  1. #1
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    fastest way to consolidate large data

    Hi Guys,

    I have a large data (more than 50k rows) in a spreadsheet and i want to consolidate the information's.

    here is the sample source data.

    Source Data
    code amt1 amt2 amt3
    123456 $16.00 $0.00 $0.00
    789011 $0.00 $18.00 $0.00
    123456 $12.00 $5.00 $0.00
    123456 $0.00 $0.00 $7.00
    111111 $11.00 $1.00 $3.00
    789011 $22.00 $0.00 $0.00

    and the output should be.

    Output
    code amt1 amt2 amt3
    123456 $28.00 $5.00 $7.00
    789011 $22.00 $18.00 $0.00
    111111 $11.00 $1.00 $3.00

    currently i'm using the consolidate function of excel inside my vba (which is working fine) but i took forever before it finished, i'm just wondering if there is an alternative way which is more faster.

    Thanks a lot.
    jdlc

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

    Re: fastest way to consolidate large data

    Assuming header in row1 and the data starts from A2
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: fastest way to consolidate large data

    I would use a pivot table for this. I'm not sure how to do pivot tables in pre-2007 though

  4. #4
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: fastest way to consolidate large data

    Quote Originally Posted by jindon View Post
    Assuming header in row1 and the data starts from A2
    Please Login or Register  to view this content.
    many thanks jindon, i appreciate your quick response, but i tried it with 50 thousands records and the result is much slower than the consolidate function of excel. anyways many thanks again if ever you have any solution please let me know.

  5. #5
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: fastest way to consolidate large data

    Quote Originally Posted by Speshul View Post
    I would use a pivot table for this. I'm not sure how to do pivot tables in pre-2007 though
    hi speshul, thanks buddy, that would be nice, but the output will be use for the mail merge and analysys.

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

    Re: fastest way to consolidate large data

    Excel Built-In function is the fastest I think.

    Any difference in time from the code I posted?
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: fastest way to consolidate large data

    Quote Originally Posted by jindon View Post
    Excel Built-In function is the fastest I think.

    Any difference in time from the code I posted?
    Please Login or Register  to view this content.
    dang! this is a blink of an eye, nice! thanks so much!
    can you add the code for the amt3, i think you miss it.
    Last edited by jdlc; 06-20-2014 at 03:43 PM.

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

    Re: fastest way to consolidate large data

    OOps

    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-31-2012
    Location
    Andromeda, Hawaii
    MS-Off Ver
    Excel 97/2003 and 5.0/97
    Posts
    49

    Re: fastest way to consolidate large data

    Quote Originally Posted by jindon View Post
    OOps

    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    genious! thanks boss!

+ 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. I have a large list of dates that i want to consolidate
    By stuartpool in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-05-2013, 05:23 AM
  2. Replies: 3
    Last Post: 01-20-2012, 03:18 AM
  3. Replies: 3
    Last Post: 12-10-2005, 10:40 AM
  4. Fastest way to load large listbox
    By Peter Hill in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-22-2005, 03:38 AM
  5. Fastest way to sort large 2-D arrays?
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-07-2005, 08:08 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