Hi, I have a spreadsheet where I'm monitoring receipts and payments that go through a bank account (sheet 1 below).

Sheet 1

Col. B-------Column C--------Column D--------Column E
Month--------Year------------Type-----------Amount

Jan----------2013------------Receipt-----------350
Jan----------2013------------Receipt-----------200
March--------2013-----------Payment----------100
July----------2013-----------Payment----------400



I'd like this to automatically inform a separate sheet, to update the actual cash flow for each month

Sheet 2

--------------------------Jan---------------------------Feb--------

Receipts-----------Expected---Actual------------Expected---Actual-

Cash inflow--------------------Cell 4d--------------------------------

Cash outflow--------------------------------------------------------


Is it possible to create a formula for my January cash inflow cell (4D) that performs as follows:

IF Column D of Sheet 1 = Receipt AND Column B of Sheet 1 = Jan, show the SUM of the corresponding cells in Column E

So in the example above, cell 4d in sheet 2 should show 550, as there are 2 rows which match the criteria of having Column B = Jan and Column D =Receipt, and the SUM of those rows is 550.

And to complicate matters, it needs to work in google docs as well :\

Any help much appreciated!