I've got an Excel problem that I really need some help with fairly urgently. I'm doing a weekly cash flow and want all my incomes and outgoings to fall into a column so everything due that week will fall into that column. So across the top I've got column headings of week ending C2 = "11/2/09", D2="18/3/09", E2= "25/3/09", F2 = "1/4/09" etc. for say 3 months (column headings are just add 7 to the previous DATEVALUE).
Down the side I've got an amount and a payment due date. So I might have a lease payment of $400 due on the 17th day of every month. I want that payment amount to fall into the correct weekly column for the next 3 months.
eg. Row 4 Column A = $400 Row 4 Column B = 17.
So a payment will appear in the week where the 17th falls. ie. week ending 18th will show a payment of $400. That's easy I can just use if DAY(B4) < DAY(D2) and > DAY (D1) then it falls into that column.
Where the problem is is at the end of the month where in this example a payment falls on the 28th of each month. The 28th is not between 25th and the 1st, so it won't fall in the slot.
I can use DATEVALUE but I've only got the day of the month as the payment date and DATEVALUE needs to get a month and year from somewhere. I can use column headings to extract i.e =MONTH(F2) but that will change a DATEVALUE from say 28/3/09 to 28/4/09 and throw the criteria out.
Hope you can understand this and give me some help. It's a bit complicated but there must be an easier solution. It has to be a common requirement for us accountants.
Thanks,
Down the side I've got an amount and a payment due date. So I might have a lease payment of $400 due on the 17th day of every month. I want that payment amount to fall into the correct weekly column for the next 3 months.
eg. Row 4 Column A = $400 Row 4 Column B = 17.
So a payment will appear in the week where the 17th falls. ie. week ending 18th will show a payment of $400. That's easy I can just use if DAY(B4) < DAY(D2) and > DAY (D1) then it falls into that column.
Where the problem is is at the end of the month where in this example a payment falls on the 28th of each month. The 28th is not between 25th and the 1st, so it won't fall in the slot.
I can use DATEVALUE but I've only got the day of the month as the payment date and DATEVALUE needs to get a month and year from somewhere. I can use column headings to extract i.e =MONTH(F2) but that will change a DATEVALUE from say 28/3/09 to 28/4/09 and throw the criteria out.
Hope you can understand this and give me some help. It's a bit complicated but there must be an easier solution. It has to be a common requirement for us accountants.
Thanks,