+ Reply to Thread
Results 1 to 4 of 4

Overflow error when concatenating

  1. #1
    Registered User
    Join Date
    06-11-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    63

    Overflow error when concatenating

    I'm using a simple VBA algorithm to eliminate duplicate elements of a huge table containing about 30 000 rows.

    I merge 4 cells containing parts, vendors, prices and currency into one single cell, using a while loop, and compare those single cells and remove duplicates.

    However when the table exceeds 32000+ rows I get a Runtime error 6 - overflow while concatenating the cells at row 32 627 or something like that. What might be the issue? Is there a way to avoid this?

    Thanks
    Nick

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Overflow error when concatenating

    Just a guess, but have you tried writing the results into a temp cell first prior to doing the comparisons?

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Overflow error when concatenating

    I suspect you've declared an incrementing variable as Integer type, you should use Long.

  4. #4
    Registered User
    Join Date
    06-11-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Overflow error when concatenating

    Quote Originally Posted by Mallycat View Post
    Just a guess, but have you tried writing the results into a temp cell first prior to doing the comparisons?
    Yes I did.

    Quote Originally Posted by DonkeyOte View Post
    I suspect you've declared an incrementing variable as Integer type, you should use Long.
    Yup, that was it. Thanks!

+ 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