rewrite modifies the workbook and uses sum formulas