How to use Tag IF Statements

Updated on:
November 14, 2023

Sometimes you might need to insert content inside your document output depending on a source value. To achieve this you can use the IF formula.

IF formula

Returns one value if a logical expression is `TRUE` and another if it is `FALSE`.

Sample Usage

{{=IF(tag name = "foo","Tag is foo", "Tag is not foo")}}

{{=IF(tag name,"Tag was true","Tag was false")}}



{{=IF(logical_expression, value_if_true, value_if_false)}}

  • logical_expression - An expression or reference to a cell containing an expression that represents some logical value, i.e. TRUE or FALSE.
  • value_if_true - The value the function returns if logical_expression is TRUE.
  • value_if_false - [ OPTIONAL - blank by default ] - The value the function returns if logical_expression is FALSE.

The tags included in the brackets don't need to be accompanied by "{{" and "}}"

Feedback and feature suggestions

We created Portant in 2021 and the feedback we have received since then has been very helpful and greatly appreciated. If you have any feedback please feel free to send us an email at or use our contact form here:


Blake and James

More than mail merge

You can do a lot more than just mail merge with Portant. Portant is a fully-fledged online document automation solution that can optimise many different document flows. You can use our online document automation platform to optimise your repetitive work, so you can get back to doing the work you enjoy.

Get started
Most Popular Templates

Save hours of manual work in just a few clicks

Transform your work life with responsive, fully customizable, and easy-to-use templates.