A VBA based formatting tool which uses an excel table to determine the grouping of a set of accounts for creating an resulting balance sheet neatly grouped under the respective headers with formats applied. Even the sum rows can be created based on the input set in the tool. Hence the tool allows the user to input an account ledger and create a formatted output structure based on a set of rules which are dynamic and can be easily updated.