+ Reply to Thread
Results 1 to 9 of 9

Add Invoice Amounts and Paid Amounts based on user inputs.

  1. #1
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Add Invoice Amounts and Paid Amounts based on user inputs.

    All,

    I am having trouble coming up with a formula to sum up invoice amounts and paid amounts based on user inputs. When adding up invoice amounts, I would like it to add up all the invoice amounts based on the selections the user has made. For example, if the Company Name was selected, it would add up all the outstanding invoices in the database and capture it in Cell E7. If the user then selects a Customer Name, it would add up all the outstanding invoices that are associated with the customer and the company and show the new value in Cell E7. If the user then enters an invoice number, it will drill down even further and add up only the outstanding invoice amounts for the particular invoice number/customer name/company name and show the value in Cell E7. There are instances where we might have a company name and an invoice number but not have a customer name. There are other anomalies that do come up once in awhile but I wasn't sure if I had to let you all know about those.

    Please let me know if there is a formula to add up the invoice/paid amounts based on user selection. I've attached a sample workbook.

    J
    Attached Files Attached Files
    Last edited by s2jrchoi; 09-18-2013 at 09:16 AM.

  2. #2
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: Add Invoice Amounts and Paid Amounts based on user inputs.

    Unmerge the Total Invoiced cell E7 because array formulas won't work with merged cells. Then use the below formula and press Ctrl+Shift+Enter to confirm it as an array.

    =SUMPRODUCT(IF(B3<>0,Table2[Paid Date]=InvoicingForm!B3,1)*IF(B5<>0,(Table2[Company Name]=InvoicingForm!B5),1)*IF(B7<>0,(Table2[Customer Name]=InvoicingForm!B7),1)*IF(B9<>0,(Table2[Invoice Number]=B9),1)*IF(InvoicingForm!B11<>0,Table2[Category]=InvoicingForm!B11,1)*IF(B13<>0,Table2[Paid Amount]=InvoicingForm!B13,1)*Table2[Invoice Amount])

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Add Invoice Amounts and Paid Amounts based on user inputs.

    Please Login or Register  to view this content.
    If the invoice number is known nothing else is needed

    I would suggest to setup a payment file so the same adding up could be set

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Add Invoice Amounts and Paid Amounts based on user inputs.

    this could be added to the paid cell
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: Add Invoice Amounts and Paid Amounts based on user inputs.

    RCM,
    Good point about the invoice number, but having it can serve as an error check since the InvoicingForm isn't set up to auto-populate based on the invoice. If ABC Company is listed as well as an invoice for another company, it would return 0 because it's the wrong invoice for that company.
    Also, nice formula - I wouldn't have thought of doing it that way. I would suggest using the table column names instead of the D:D so it's not searching the million+ empty rows.

  6. #6
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Add Invoice Amounts and Paid Amounts based on user inputs.

    Thank you both for your inputs. I've actually tried the if statement rcm provided before I came to this forum, but it didn't give me what I wanted. For example, say ABC Company as a whole was invoiced $95,000. However, if the user selects Light Bulb Installation as a Category to make payment to, the total invoiced amount should drop from $95k to $50k. I've updated rcm's formula to include category as well:

    Please Login or Register  to view this content.
    With this formula, I don't think it captures the anomalies as I mentioned earlier. For example, if I only had Company Name and Category selected, it wouldn't add it up since the formula doesn't capture it. Please let me know if there is a formula that captures the anomalies as well. If there is no better way to do this, please tell me that I'm crazy.

    Thank you again for your help!!!

  7. #7
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Add Invoice Amounts and Paid Amounts based on user inputs.

    Dang it...I forgot to do the ctrl + shift + enter for your array formula, jeffr27. Your formula was exactly what I was looking for. Thank you for your help!! Just need to figure out how to do it for the Total Paid amount. Thank you both for your help!!!! I will mark this as solved.

  8. #8
    Registered User
    Join Date
    08-05-2013
    Location
    USA
    MS-Off Ver
    2010
    Posts
    76

    Re: Add Invoice Amounts and Paid Amounts based on user inputs.

    It's the same array formula, except instead of *Table2[Invoice Amount] at the end, it's *Table2[Paid Amount]

    =SUMPRODUCT(IF(B3<>0,Table2[Paid Date]=InvoicingForm!B3,1)*IF(B5<>0,(Table2[Company Name]=InvoicingForm!B5),1)*IF(B7<>0,(Table2[Customer Name]=InvoicingForm!B7),1)*IF(B9<>0,(Table2[Invoice Number]=B9),1)*IF(InvoicingForm!B11<>0,Table2[Category]=InvoicingForm!B11,1)*IF(B13<>0,Table2[Paid Amount]=InvoicingForm!B13,1)*Table2[Paid Amount])

    Again, use Ctrl+Shift+Enter.

    And I'm glad we could help.
    Last edited by jeffr27; 09-18-2013 at 01:49 PM.

  9. #9
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Add Invoice Amounts and Paid Amounts based on user inputs.

    Thank you again!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formula to take amounts from other sheet with no duplicate amounts
    By Xx7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-06-2013, 04:34 PM
  2. Replies: 8
    Last Post: 04-19-2013, 12:06 PM
  3. Formula to calculate amounts paid per account
    By Hblbs in forum Excel General
    Replies: 3
    Last Post: 11-05-2010, 08:17 AM
  4. Replies: 5
    Last Post: 03-29-2008, 02:37 PM
  5. [SOLVED] invoice amounts in 2 columns?
    By KatieM in forum Excel General
    Replies: 1
    Last Post: 06-27-2006, 09:54 AM

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