creating current and noncurrent line item summary (add up category values based off current + prior month)

destro__

New Member
Joined
Feb 10, 2015
Messages
1
Goal: To create 2 line items (current expense and non current expense) that auto populate once I create a data extract from a database and update the current date.

current expense: sum all line item values within current month and previous month IF the line items are a certain category.
noncurrent expense: same as above but for values 3 months or older from current month


example:

Here is a smaple data set:[TABLE="width: 276"]
<tbody>[TR]
[TD]Document Type[/TD]
[TD]Posting Date[/TD]
[TD]Amount in local currency[/TD]
[/TR]
[TR]
[TD]AC[/TD]
[TD]1/29/2015[/TD]
[TD](159,017.00)[/TD]
[/TR]
[TR]
[TD]SA[/TD]
[TD]1/28/2015[/TD]
[TD](598,716.15)[/TD]
[/TR]
[TR]
[TD]TM[/TD]
[TD]1/29/2015[/TD]
[TD](14.50)[/TD]
[/TR]
[TR]
[TD]TM[/TD]
[TD]1/29/2015[/TD]
[TD](814.00)[/TD]
[/TR]
[TR]
[TD]TM[/TD]
[TD]1/21/2015[/TD]
[TD](1,520.00)[/TD]
[/TR]
[TR]
[TD]TM[/TD]
[TD]1/20/2015[/TD]
[TD](115.05)[/TD]
[/TR]
</tbody><colgroup><col><col><col></colgroup>[/TABLE]

current expense: I want to sum up all the "TM" document types if they are in the current month (january) or previous month (december)

noncurrent expense: I want to sum up all the "TM" document types if they are in prior to december
I would like the formulas that calculate each line item to be based off the current month


I've been trying to use SUMIFS and SUMPRODUCT but can't seem to get it down.

Thank you for any time and help!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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