Hi Ken,
Well there's a number of ways that you can create a revenue/expense summary by department. It all depends on how you want it to be presented.
A brief 'lesson' (for others reading this) in case you want to do something a little different, so you can tailor this to your needs:
The formula that the Adagio Financial Reporter uses to read the Ledger data is:
=ADGET('gldata.FIELD','ACCT-DEPT')
You can put any specific field code for FIELD, any single or range of accounts for ACCT, and any single or range of departments for DEPT. In addition, you may use a cell reference to indicate either the account, department or both (just like you would in Excel).
------
In your specific requirements, it appears you want all Revenue or Expense accounts consolidated into a single row, and one row per Department. This is how I would do this:
In column A, type the Department code. If it is completely numeric, put an apostrophe in front of it to indicate the cell contents is a text string.
In column B, type the formula for the Actual YTD amount, using a cell reference to get the account. If you were working in Row 9 (for example), the formula would be:
=ADGET('gldata.Y','5000:5999-'&$A9)
Copy that cell and paste in in column C. Change 'Y' to 'BY' for the Budget YTD.
In column D, use the simple formula =$B9-$C9 to get the variance.
Now you've got one row complete, copy the row and paste it below. Edit the department code in column A to the next code, and that row is now done. Copying/pasting automatically updates the cell reference to the correct row.
When you get to the Expense rows, replace 5000:5999 with 6000:6999, and with some additional formatting, you're done!
Take care,