+ Reply to Thread
Results 1 to 4 of 4

formula needed to search account numbers, sum totals and compare

  1. #1
    Registered User
    Join Date
    08-22-2006
    Posts
    18

    formula needed to search account numbers, sum totals and compare

    I am having trouble with what I thought would be a relatively simple calculation. I have an existing spreadsheet that identifies account numbers, separates by product, lists $ past due, and also lists $ I owe them. I am trying to figure out if the past due $ they owe me is greater than the $ I need to refund. The problem is, the refund information I have is broken down by product type, and each line of data has the total amount past due (all products).

    I’m attaching an extremely simplified spreadsheet as a reference example. Basically, for each group of account numbers I need a formula that will search column A for identical account numbers then total the balance in the corresponding cells in column D and then compare that to a single cell in column C. For example…Account #100 is on lines 2-5. I need to add D2:D5, then take that figure and compare to C2 with an output in column e identifying if the sum of cells in column D was larger, or the single cell for column C.

    Any help is greatly appreciated...thanks.
    Attached Files Attached Files
    Last edited by NBVC; 01-09-2012 at 03:57 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: formula needed to search account numbers, sum totals and compare

    =SUMIF($A$2:$A$14,A2,$D$2:$D$14) gets the sum of all column D where column A is same as current row's A value.

    you can add to the formula:

    e.g

    =SUMIF($A$2:$A$14,A2,$D$2:$D$14)-C2 will give the difference with column C

    or

    =SUMIF($A$2:$A$14,A2,$D$2:$D$14)>C2 will give TRUE if sum is larger than C value or FALSE if not.

    copy formula down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: formula needed to search account numbers, sum totals and compare

    One way is use Pivot Table, & use a calculated Field as =MAX(0,'Past Due'-'Refund $ Owed')

    See the attached.
    Attached Files Attached Files
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Registered User
    Join Date
    08-22-2006
    Posts
    18

    Re: formula needed to search account numbers, sum totals and compare

    Excellent...thanks both for your assistance.

+ 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