2012-07-21 78 views
2

我有以下字段會計事務表:會計表設計優秀餘額由因天(0-30,31-60等)

  • 的transactionId
  • 日期
  • TRANSACTIONTYPE(收費,支付,信用等)
  • debitaccount
  • creditaccount

和我有以下記錄

id date   type  debaccount credaccount amount 
-- ---------- ------- ---------- ----------- ------ 
1 02/13/2012 charge utilities receivables $200.00 
2 02/17/2012 charge maintenan receivables $150.00 
3 03/06/2012 credit receivables utilities  ($20.00) 
4 03/27/2012 charge repairs  receivables $80.00 
5 04/29/2012 charge utilities receivables $135.00 
6 05/21/2012 charge utilities receivables $70.00 
7 06/22/2012 charge utilities receivables $60.00 
8 07/19/2012 payment receivables utilities  ($100.00)  

現在我能得到沒有問題的平衡,所以我知道:

帳戶公用事業收入 200-20(信用)+ 135 + 70 + 60 = 445 - 100(金)=平衡$ 345

現在我需要的是讓由因天例如餘額:

Account  0-30 days 31-60 days 61-90 days 90+ days Balance 
--------- --------- ---------- ---------- --------- ---------- 
receivables $60.00  $70.00  $135.00  $200.00  $465.00 
                ($20)  $445.00 
                ($100)  $345.00 

我已經看到,如果您有未結餘額,如果您進行付款,該付款將影響最後一次付款(如表中所示)。我的問題是,如果我需要在交易和交易之間建立關係,那麼我將知道一次付款會影響「x」次收費。這是我想到的唯一解決方案,以便在到期日前獲得理想的未結餘額。

任何幫助將不勝感激!

感謝

回答

0

如果您使用的Excel 2010,那麼你可以使用「SUMIFS」功能。

您可以檢查虛擬解決方案。

test.xlsx

[URL = HTTP://www.4shared.com/file/bVIFy_X8/test.html] test.xlsx [/ URL]