In Crystal Reports I have two formulas, one that adds revenue accounts (If {GL_ACCT.ACCT_TYPE}="revenue" then Sum({GL_BAL.ENDING_BAL}, {GL_ACCT.ACCT_TYPE}) else 0) and one that adds expense accounts (If {GL_ACCT.ACCT_TYPE}="expense" then Sum({GL_BAL.ENDING_BAL}, {GL_ACCT.ACCT_TYPE}) else 0). I am trying to write a formula that will subtract the expense account totals from the revenue account totals.