Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Mar 2004
    Location
    North Carolina, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    (Impossible)Number Add to Find (Excel 2000)

    Hi Loungers, I may asking the impossible... I am doing a reconciliation between 2 systems and the amount is off by 3,087.59. I have looked for this exact amount and tried to locate the difference in many other ways to no avail... Is there any magic I can perform in Excel to see if there is any combination of numbers I have in particular column can be added to arrive at this number? For example, my numbers are in column b... Would adding any numbers together in column b arrive at 3087.59.

    Thanks in advance for considering this.

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: (Impossible)Number Add to Find (Excel 2000)

    You might have some luck with some of the things mentioned in the thread containing <post#=418773>post 418773</post#>.
    Maybe the solver.xla add-in?

    Alan

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: (Impossible)Number Add to Find (Excel 2000)

    Hi,

    Try the 'AddsUp' sub below. It checks all cell pairs and triplets in A1:A30 and reports any that add up to the value stored in B1 in Column C. Change the test range and input/output ranges to suit your needs.

    Picked it up somewhere ...

    Cheers

    <pre>Sub AddsUp()
    Columns(3).Clear
    R = 1
    T = Cells(1, 2)
    For X = 1 To 30
    For Y = X + 1 To 30
    If Cells(X, 1) + Cells(Y, 1) = T Then
    Cells(R, 3) = A(X) + "+" + A(Y)
    R = R + 1
    Else
    For Z = Y + 1 To 30
    If Cells(X, 1) + Cells(Y, 1) + Cells(Z, 1) = T Then
    Cells(R, 3) = A(X) + "+" + A(Y) + "+" + A(Z)
    R = R + 1
    End If
    Next Z
    End If
    Next Y
    Next X
    End Sub

    Private Function A(ByVal R As Integer) As String
    A = Cells(R, 1).Address(False, False)
    End Function
    </pre>

    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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