Hi
I have a table of data, which is the annual budget by month for each account in the accounting system. The format is:
Account Name, Jan, Feb, Mar, Apr, etc.
Each month's report needs to pull a YTD amount for each account by summing from Jan to that month. I'm working on April, so in this case Jan to Apr.
So that I don't need to update the formula to extend the range each month I want to create a formula to find the current end month.
From the dates I have on the data page I've pulled the month number using the MONTH function and put it in a cell named MonthNo.
My formula to sum the YTD budget is (I've tried with and without the quotes around the first cell reference):
=SUM("C201:"&CELL("address",OFFSET(B201,0,MonthNo)))
But that returns a #VALUE error. Evaluating the CELL part give me that error, however, if I use that by itself I get a cell address ($F$201), which is the correct cell for the sum.
If I use the formula
=SUM(C201:F201)
I get the correct result. But that means I need to update the formula each month.
How can I get this to work?
Thanks
Mardi
Hi Mardi,
Please supply the workbook.
Regards
Phil
Hi Phil
Can I email it to you? I don't want to put it on a public forum.
Thanks
Mardi
Hi Mardi,
You don't need the CELL function. Please refer to session 3.15 for OFFSET from the 2019/365 course. If you're still stuck, then email us your file with your attempt without CELL so we can see why it's still not working.
Mynda
Lovely, worked perfectly once I watched 3.15 (again).