Sheets

Formulas and functions

Start any cell with = to calculate values, reference cells across tabs, and browse every function Nemi Sheets supports.

On this page

Start a cell with = to write a formula, either directly in the cell or in the formula bar above the grid (which shows Enter a value or =SUM(A1:A5) when empty). As you type, Nemi suggests matching functions and tab names and highlights referenced cells on the grid. Press Enter, Tab or click elsewhere to save; press Esc to cancel.

You can writeExample
A cell reference=A1
A range=SUM(A1:B20)
A whole column=SUM(B:B), or =SUM(B2:B) to skip a header row
A locked reference that doesn't shift when copied=$B$2, or =B$2 to lock only the row
Arithmetic=(A1+A2)*0.21
Joined text=A1&" "&B1
A comparison=A1>=100
A condition=IF(A1>100,"over","under")

Reference another tab#

Formulas can pull values from any other tab in the same spreadsheet. Type the tab name, an exclamation mark, and the cell or range: =Sheet2!A1 reads one cell, and =SUM(Sheet2!B:B) totals a column. Wrap tab names containing spaces in single quotes, like ='Monthly totals'!A1:B5.

  1. 1

    Start the formula

    Type = and the start of your formula (such as =SUM() in a cell or the formula bar.

  2. 2

    Click the other tab

    Your formula stays open in the formula bar, and a strip above the grid reminds you which cell you're editing.

  3. 3

    Click a cell, or drag over a range

    Nemi inserts the reference with the tab name included, like 'Form responses'!B2:B40. Click again to adjust it.

  4. 4

    Press Enter

    The formula saves to your original cell and returns you to its tab. Press Esc to cancel instead.

Clicking adds a cell reference right after =, an opening bracket, a comma or an operator like +. Clicking anywhere else finishes the formula. Point-and-click works on your current tab too.

  • Capitalisation doesn't matter: sheet2!a1 and Sheet2!A1 point to the same tab.
  • Start typing a tab name to see it in autocomplete, already quoted if needed. Typing Orders! lists that tab's columns by their first-row headings, and picking one inserts the full column (like Orders!E:E).
  • Whole-column references (Orders!E:E or Orders!E2:E) read up to 10,000 rows of data. They're ideal for tabs that grow over time, like connected tabs, so =SUM(Orders!E:E) stays accurate after every refresh.
  • A single range can't span two tabs. Write one reference per tab and add them together instead.
  • Copying or filling a formula keeps its tab name intact, so totals filled down a column continue reading from the right tab.
  • Renaming a tab updates every formula that points to it automatically. Because tab names are unique (ignoring capitals), references never collide.
  • Connected tabs are read-only, so put your totals and lookups on another tab and point them at the connected tab. They recalculate automatically on every refresh. See Connecting a tab to app data.

Supported functions#

Here is the complete list of functions Nemi Sheets supports. Anything else returns #NAME?, which means Nemi doesn't recognise that function name.

KindFunctions
Maths and statisticsSUM, AVERAGE, MIN, MAX, COUNT, COUNTA, COUNTBLANK, PRODUCT, MEDIAN, STDEV
NumbersROUND, ROUNDUP, ROUNDDOWN, ABS, SQRT, POWER, MOD, INT, CEILING, FLOOR, EXP, LN, LOG, SIGN
LogicIF, IFS, IFERROR, AND, OR, NOT, TRUE, FALSE, ISBLANK, ISNUMBER, ISTEXT
TextCONCAT, CONCATENATE, TEXTJOIN, LEN, UPPER, LOWER, TRIM, LEFT, RIGHT, MID, REPT, SUBSTITUTE, TEXT
Conditional totalsCOUNTIF, SUMIF, AVERAGEIF, COUNTIFS, SUMIFS
Dates and timesTODAY, NOW, DATE, YEAR, MONTH, DAY, HOUR, MINUTE, EOMONTH, WEEKDAY, WEEKNUM, DATEDIF
LookupsVLOOKUP, HLOOKUP, XLOOKUP, INDEX, MATCH

AVG is also accepted as a shorthand for AVERAGE.

IF and IFERROR only evaluate the branch they need, so wrapping a lookup in =IFERROR(VLOOKUP(...),"not found") is fast and safe. XLOOKUP takes the value to find, the search column, the return column, and an optional fallback if there's no match.

What the errors mean#

ErrorWhat went wrong
#NAME?An unknown function name. Check the spelling against the list above.
#VALUE!The wrong type of value, usually text where a number is expected or an invalid date.
#DIV/0!Dividing by zero or by an empty cell.
#REF!A broken reference (often from a deleted row or column), or a range used where one cell is expected, like =B:B outside of SUM(B:B).
#N/AA lookup found no match. Wrap it in IFERROR if missing values are expected.
#NUM!An impossible numeric argument, like a date range that ends before it starts.
#CYCLEThe formula points back to itself, directly or through other cells. Nemi stops to avoid an infinite loop.

Copying formulas#

When you copy, paste or drag the fill handle on a formula, its cell references shift with it: =A2+B2 in C2 becomes =A3+B3 in C3. Add a dollar sign to lock any part in place: $A2 locks the column, A$2 locks the row, and $A$2 locks both.

1

Type =

Matching functions appear as soon as you start typing.

2

Point at cells

Click cells on this tab or another tab to insert them. Referenced ranges highlight in the grid.

3

Press Enter

The result shows in the cell while the formula stays in the bar.

4

Fill it down

Drag the corner handle. References shift automatically unless locked.

One thing to know before you export#

Every export format except .nemi writes the calculated values, not the underlying formulas. CSV, PDF, Markdown, Excel and OpenDocument exports all capture the results. To preserve your formulas for later editing, export as .nemi. See Importing and exporting for details.

Related

Still stuck? Email support@nemilab.com and tell us what you were trying to do.