Excel Formula/VBA-Conditional Sum to find contra from multiple entries
Page 9 of 9 FirstFirst ... 789
Results 81 to 83 of 83

Thread: Excel Formula/VBA-Conditional Sum to find contra from multiple entries

  1. #81
    Board Regular Akuini's Avatar
    Join Date
    Feb 2016
    Location
    Indonesia
    Posts
    1,961
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    4 Thread(s)

    Default Re: Excel Formula/VBA-Conditional Sum to find contra from multiple entries

    Quote Originally Posted by Miratshah View Post
    Hey Akuini,

    While the code works absolutely brilliant, when I add a big volume, I get an error saying "Error found:Overflow"

    Any idea?
    Could you be more specific with what you mean by a big volume?


    Try replacing all "Integer" with "Long" in this part:

    Sub CombinationsNP2(vElements As Variant, p As Integer, vresult As Variant, lRow As Long, iElement As Integer, iIndex As Integer)
    Dim i As Integer


    so it becomes:

    Sub CombinationsNP2(vElements As Variant, p As Long, vresult As Variant, lRow As Long, iElement As Long, iIndex As Long)
    Dim i As Long

  2. #82
    Board Regular
    Join Date
    Nov 2016
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Excel Formula/VBA-Conditional Sum to find contra from multiple entries

    Quote Originally Posted by Akuini View Post
    Could you be more specific with what you mean by a big volume?
    When I tried to run this macro on rows about 60000 rows, It ran once and in next few runs, I got an error of Overflow.

    I will try to replace "integer" with "long" as per your suggestion.

  3. #83
    Board Regular
    Join Date
    Nov 2016
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Excel Formula/VBA-Conditional Sum to find contra from multiple entries

    Hi Akuini,

    I tried to replace Integer with Long, however still no luck.
    Strangely I could execute the old Macro on huge data. Not sure why sometimes it does not run and five overflow error.

    One more thing, for 1 job, there can be multiple combinations which are marked as contra. Can this Macro highlight which all combinations are contra with each other? For example, if I have 500 lines of which, 300 are contra, Can i know within these 300, which rows are contra against which rows?

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •