Auto sum categories based on date formula

gingerbreadgrl

New Member
Joined
Aug 19, 2019
Messages
48
Hi,

I am working on an accounting workbook. My current formula is manually done, but I would like, if possible, for the formula to look at all the rows, take all rows with a January date, and automatically sum them by category. I also don't know how to subtract the credit/debit columns. Here is the current formula (located in Worksheet 2 in the month column):

=SUMIF(AccountActivity!$F$2:$F$71,Summary!$A$2,AccountActivity!$D$2:$D$71)

This is the formula for January, I manually entered the numbers for rows 2-17 because that is when the January items end. But, I'm wondering if I can have the formula automatically go through the date column instead so I don't have to change the formula for each column in the Summary worksheet.

I also would like to subtract the credit column from the debit column, I tried this but it gave me an error.

=SUMIF(AccountActivity!$F$2:$F$71,Summary!$A$2,(AccountActivity!$D$2:$D$71-AccountActivity!$C$2:$C$71))


Here is an example of what the 2 worksheets look like:

Worksheet 1: Account activity

Note: Expense Type column is a data validation dropdown with options from a list.

Posting DateItemCredit DebitBalanceExpense Type
1/2/2020Office Evolution2001500Rent
1/4/2020Comcast1501350Utilities

Worksheet 2: Summary
Note: Expense Type column is a data validation dropdown with options from a list.

Expense TypeJanuaryFebruaryMarchAprilJuneJulyAugustSeptember2020 Total
Rent200
Utilities150

Any tips on the formula would be much appreciated! Hope everyone is staying healthy!!

Best,
Gingerbreadgrl
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I would define the month names as dates, like 01/01/2020 and format it as "mmmm" to show month name.
Book1
BCDEFGHIJKL
3Expense Typejanuarifebruarimaartaprilmeijunijuliaugustusseptember2020 Total
4Rent02000000000200
5Utilities00015000000150
Sheet2
Cell Formulas
RangeFormula
C4:K5C4=SUMIFS(Sheet1!$D$2:$D$100,Sheet1!$F$2:$F$100,Sheet2!$B4,Sheet1!$A$2:$A$100,">="&Sheet2!C$3,Sheet1!$A$2:$A$100,"<="&EOMONTH(Sheet2!C$3,0))-SUMIFS(Sheet1!$C$2:$C$100,Sheet1!$F$2:$F$100,Sheet2!$B4,Sheet1!$A$2:$A$100,">="&Sheet2!C$3,Sheet1!$A$2:$A$100,"<="&EOMONTH(Sheet2!C$3,0))
L4:L5L4=SUM(C4:K4)
 
Upvote 0

Forum statistics

Threads
1,214,956
Messages
6,122,465
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top