WorkStudio Help
TableStudio

IF / AND / OR

Build conditional formulas in TableStudio by testing comparisons and choosing between true and false branches.

Use IF when one cell should return different results depending on a condition. Use AND and OR when that condition depends on several checks.

The standard form is =IF(condition, value_if_true, value_if_false). Conditions can compare numbers, text, dates, or formula results. Examples include A1>5, A1<=5, A1="", B2<>"Issued", or C1>=TODAY.

Comparison operators mean:

  • = equal to
  • <> different from
  • != also different from
  • > greater than
  • < less than
  • >= greater than or equal to
  • <= less than or equal to

AND returns 1 only when all conditions are true. OR returns 1 when at least one condition is true. In practice they are most useful inside IF, for example =IF(OR(A1="",A2=""),"",C1-B1+1).

This standard syntax also covers the common user-friendly cases. If you want "leave the cell blank until both source cells are filled", use =IF(OR(A1="",A2=""),"",your_formula_here). If you want one formula above a threshold and another formula below it, use =IF(A1>5,A1+A2,A1-A2).

DEFAULT has two intended uses:

  • in a normal cell formula, bare DEFAULT means "use this column's derived formula for the current row"
  • in a derived formula, DEFAULT(expression) is an explicit wrapper for the normal/default branch expression

AND and OR can be nested, and the true/false branches in IF can also contain other formulas such as ROUND, SUM, date helpers, TOBJ exported values, or cross-sheet references.

Open TableStudio ↗

Function

IF(condition, value_if_true[, value_if_false])
AND(condition1, condition2, ...)
OR(condition1, condition2, ...)

Parameters

  • condition — A comparison or truthy test. Conditions support =, <>, !=, >, <, >=, and <= and can use numbers, text, dates, references, or nested AND / OR checks.
  • value_if_true / value_if_false — The value or formula returned when the IF condition is true or false.
  • condition1, condition2, ... — The list of conditions evaluated by AND or OR.

Returns

IF returns the chosen branch value. AND and OR return 1 for true and 0 for false, so they can be nested inside IF or other numeric formulas.

=IF(A1>5,A1+A2,A1-A2) picks one of two calculations.

=IF(OR(A1="",A2=""),"",C1-B1+1) keeps a result blank until both source cells are filled.

=IF(OR(A1="",B1=""),"",DEFAULT) falls back to the column derived formula when the guard passes.

Keep the cell blank until both sources exist

OR is a good way to stop a derived or normal formula until all required source cells are filled.

Choose one formula or another

IF switches between arithmetic branches depending on the comparison result.

Enable JavaScript to use reading progress and usefulness ratings.