Assume there are three worksheets, one each for 2008, 2009 and 2010. On each sheet there are two columns for Account code and Account description. Thereafter there are 12 columns (one for each month). Values inside the matrix represent amount spent on a specific item in a specific month.
On the P&L worksheet, a user will provide the following five inputs – beginning month, beginning year, ending month, ending year and Account code. Accordingly, the value should get summed up from multiple sheets.
You may refer to my solution in the this workbook.