Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate amt due

OCM

MIS
Sep 12, 2002
221
US
Greetings,

Given my sample workbook in Sheet1, I would like to calculate the amount due by subtracting the total collection amt from one of the settlement #1 per CustID. If the settlement #1 is blank, (e.g., customer #6 – Customer #8, then use settlement #2 to perform the calculation.

Amount due = Settlement #1 - sum of collection amt. If the amount is not entered in settlement #1, then use settlement #2 – sum of collection amt. If the amount is $0.00, then display “no amount due”



On sheet2, I’d like to show the result (attached).



Any feedback?



TIA
 

Attachments

  • Calculate Amt due.zip
    12 KB · Views: 8
Yeah... my feedback would be "We don't do homework." :)
 
With a layout as in the workbook, IMHO the only way is to manually arrange output.

If it is possible to rearrange data, I would use:
columnexample/remarks
CustIDC004200
NameCusomer #4
SettlementID#1, #2, ...
TypeSettlement, collection
Amountuse negative in one of types (for proper sums)
Dateadd start date for Settlement
After this a simple pivot table can aggregate required values up-to-date.
More flexible analysis could combine customer+settlement data in one table and related collection in the second one. In this case pivot table could return report from tables connected in Power Query.
 

Part and Inventory Search

Sponsor

Back
Top