Hi all, hope I can get some help here.
I am trying to create a rolling balance for an account assuming known Weekly and Monthly expenses. For the weekly expenses, I would know which day of the week it would occur (1-7) and for the monthly expenses I would know which day of the month it would occur (1-31). I would start with the current date using TODAY() and add consecutive dates for the next 180 days. I would then like excel to look at all the expenses, look at a field that calls the expense out as weekly or monthly, then look at the date in the data table, and determine if today is one of those days (using WEEKDAY() and DAY()). I could then see this for the next 180 days to get a good estimate of what the Account balance should look like.
I can get everything to work expect for excel knowing how to distinguish between weekly or monthly expenses. I have tried playing around with SUMIF, DSUM, and SUMPRODUCT but I can't get that final piece to work. Below is a simplified version of what I am envisioning this looking like.
Capture.JPG
The SUMIF I currently have in cell C4 is: =SUMIF($G$4:$G$8,WEEKDAY(A4),$H$4:$H$8)
The formula for C5 reads =SUMIF($G$4:$G$8,WEEKDAY(A5),$H$4:$H$8), etc, etc.
The SUMIF I currently have in cell D4 is: =SUMIF($G$4:$G$8,DAY(A4),$H$4:$H$8)
The formula for D5 reads =SUMIF($G$4:$G$8,DAY(A5),$H$4:$H$8)
Right now it can't recognize if it's a weekly or monthly expense. If it could, based on the Data Table, the only value that should be in column D is the $50 at cell D16.
Any idea on how to do this? I think DSUM might be what I need but I can't figure out how to do variable criteria to deal with the constantly changing date.
I have attached this sample excel file if you would like to play around with it.
Bookmarks