Hi All,
Basic example of the following attached.
I have a worksheet that assembles data from a report exported from another database. I want to create a formula that takes this assembled data and formats it into something that resembles an accounting journal.
On the attached:
- Cells B3:G10 represent the assembled data
- Cells B15:E27 represent the ideal solution I am looking for. Ideal because it omits and zero values from the journal
- Cells B15:E30 represent a satisfactory solution. Satisfactory because it assembles all data (including zero values) but I will still have to manually omit any zero values from the journal by deleting myself
The requirements:
- The journal should group primarily by type of expense (expenses are represented by column in the 'assembled data' section) and within this, by department (Dept 1 being listed first, Dept 2 second and so on).
- The solution should detect that there are no more than 3 departments in the assembled data. Therefore it will list "Expense Type 1 - Dept. 1" on the first row, "Expense Type 1 - Dept. 2" on the second row, "Expense Type 1 - Dept. 3" on the third row. The solution will then detect that there is no Dept 4 and will proceed by listing "Expense Type 2 - Dept 1" on the fourth row and so on. Please note that the number of departments can increase or decrease month to month so the solution must have the flexibility to list "Expense Type 1 - Dept. 4" should Dept 4 ever be added.
FYI - I would like a formula solution to this as oppose Macro. I don't know anything about Macros and I would like to be in a position to maintain myself should anything go wrong.
Bookmarks