SheetCommand · Excel formulas

How to use the SUM function in Excel

Add numbers in a range with a reliable SUM formula.

SUM adds numbers from cells and ranges. SheetCommand can also display the sum of a named numeric column, but it does not insert a SUM formula into your workbook.

What does SUM include?

=SUM(B2:B10) adds the numeric cells in that range. You can include multiple separate ranges as additional arguments.

Numbers stored as text inside referenced cells may be ignored. Check cell types when the result is lower than expected.

Total a sales column

When B2:B10 contains sales amounts, enter the formula below in an empty cell. If the table grows, check that the range includes the new rows.

For a quick read-only answer in SheetCommand, upload the file and ask for the sum of the Amount column. The answer appears in the summary, not in a new cell.

How to do it

  1. Identify the numeric range.
  2. Enter the SUM formula in an empty cell.
  3. Compare the result with a few known records.
Example formula=SUM(B2:B10)

Sample order total: what does 2,900 include?

With city in A, status in B, and amount in C, the four amounts add to 1,200 + 800 + 400 + 500 = 2,900. SUM(C2:C5) includes all four numbers. It includes the returned order of 400 because SUM does not interpret the order status.

For completed sales only, use a status condition with SUMIF/SUMIFS or filter the source correctly. Decide how returns are signed and defined before calling the figure net revenue.

RowCityStatusAmount
2IstanbulCompleted1,200
3AnkaraCompleted800
4IstanbulReturned400
5IstanbulCompleted500
Example formula=SUM(C2:C5)

Check new rows and numbers stored as text

If a new order appears in C6, the C2:C5 range will not expand by itself. Update the range or use an appropriate Excel Table. Do not include a precomputed total row in the range again.

A displayed 1,200 may actually be text. Check the cell type and manually add a few known rows to catch missing values. In SheetCommand, an Amount-column sum appears as a summary answer; no SUM formula is written to Excel.

Why can a total be wrong?

A range that ends too early and text-formatted numbers are common causes.

For one condition use SUMIF; for several conditions use SUMIFS. SUM by itself does not filter rows.

Frequently asked questions

Does SheetCommand write SUM formulas?

No. It displays the total of a named numeric column without adding a formula to the file.

Are blank cells counted?

Blank cells add nothing to the total.

Sources and further reading

SheetCommand

See a column total without a formula

Upload a file and ask for the sum of a numeric column by name.

Use for free →