Column subtotals and totals (QBOL) |
Top Previous Next |
This example demonstrates:
Column Subtotals with FullSpeed As this is written, QuickBooks Online does not have the ability to provide subtotals on data entry forms (invoices, purchase orders, etc.). A FullSpeed macro can give you subtotals, and they work almost identically to totals, which were described in the Column total (QBOL) topic) This example shows how to subtotal the quantity (Qty) column on a QuickBooks Online form. Getting Ready Set up a subtotal item in QuickBooks Online Instead of using existing Products and Services items to trigger FullSpeed calculations, usually you will set up a new item for that purpose. This assures the item won't record income unless you want it to (if the Price/Rate is set to 0) and it lets the item provide any descriptive information you may want. Here's a new item, SubtotQty, added for subtotaling a column. Notes:
Use the item on a form Select the SubtotQty item on the line immediately below each group of lines you want to subtotal. Enter a formula for subtotaling the Qty column, and its trigger text
The Qty column is the third column on the form (see the screenshot above), so put the formula in at least the third column of the macro worksheet. You need to leave room to access the form's first column—the Item column—because it contains the trigger item, SubtotQty.
That way, when FullSpeed encounters the trigger text in QuickBooks Online it will calculate the formula.
Notice that this formula actually sums the Sandbox rows of the Qty column. That is a shorthand way of telling FullSpeed to sum the entire Qty column when the macro runs.
Choose macro options Choose appropriate options for running the macro:
Running the Macro
Why the first cell? Because FullSpeed macros process a form downward from where the macro is invoked (run). To total the entire Qty column we must begin at the top of the column. Why the Qty column? Because that's what we selected as the Begin field in the macro worksheet.
FullSpeed will traverse the form, gathering data. As it reaches each SubtotQty row it will write a subtotal in the Qty field. Can I have Subtotals and Totals? Yes! You can nest any number of subtotal and total levels on your forms. Just use a different trigger item for each level. Here's the same example as the above, but with a TotalQty item (from the Column totals (QBOL) topic's example) added to the form (note the green arrow): And here is the macro worksheet with the TotalQty name and formula added on a separate text-triggered formula row: Notes:
Finally, here's the result of a macro run with both subtotals and a total: Can I Subtotal the Amount Column? Yes. The technique is only slightly different and is discussed in the next topic, Subtotaling the Amount column (QBOL). |