+ Reply to Thread
Results 1 to 8 of 8

Run time error 6 Overflow?

  1. #1
    Registered User
    Join Date
    07-26-2011
    Location
    leicester england
    MS-Off Ver
    Excel 2007
    Posts
    20

    Run time error 6 Overflow?

    Hello, I have this program that im trying to fix, the problem is it comes up with run time error 6 overflow, it states the problem is with the below. But when i delete the data and try it again it will work without the error, very werid!
    Please Login or Register  to view this content.
    Any ideas?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Run time error 6 Overflow?

    Hello ben5496,

    A For Next loop requires a number for the control index. You have used RowIndex which you declared as Range not as a number.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-26-2011
    Location
    leicester england
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Run time error 6 Overflow?

    Hello

    Thank you for your help, but I go the code the wrong way round. I defined it as long because some of the data sets are huge.
    But still I have the run time issue

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Run time error 6 Overflow?

    Hello Ben,

    Can you explain what you want the code to do?

  5. #5
    Registered User
    Join Date
    07-26-2011
    Location
    leicester england
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Run time error 6 Overflow?

    Hello the code uses three columns
    Basically if column A1 and B1 are the same as A2 and B2 then it will add up the numbers in column C. but when consolidating the data it will come up with run time error 6

    thank you for your interest and help

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Run time error 6 Overflow?

    Hello Ben,

    Sorry for the delay, I was out for awhile. If can post your workbook then I can do this faster.

  7. #7
    Registered User
    Join Date
    07-26-2011
    Location
    leicester england
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Run time error 6 Overflow?

    Hello
    SORRY for the delay
    here is my work book, just to refresh the error comes out run time error 6 'overflow'.
    Thank you for help

    I do not have the data but, it is consolidated into three columns. A B C. The the data is consolidated by matching column A1 and B1 to A2 and B2 and so on until it has reached the end of the list. when A1 and B1 are match to A2 and B2 the figures in column C1 is added to column C2
    Attached Files Attached Files

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Run time error 6 Overflow?

    Hello ben5496,

    Can you post the text file the workbook opens? This will help me ensure the macro is performing correctly.

+ 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