In tables, conditional text tags can be used to include and exclude both text in cells and complete rows or columns in the table. It is important to understand how this works before you start using conditional tags in tables, otherwise you can get unexpected results.
Normal text inside a cell:If the IF and END tags are both inside the same cell, conditional text in a cell works exactly the same as in normal text. It simply includes or excludes the tagged content according to the conditions. Even if the entire contents of the cell are deleted, nothing happens to the column or row containing the cell if there are also other cells with content in the column or row. (You cannot delete a single cell leaving just an empty space in the table.) When a condition completely deletes the contents of a cell:The only exception to this behavior is when conditional tags completely delete the contents of a cell and the cell is the only cell in the current row or column. If that happens, then the row or column will also be deleted. If you want to prevent this and leave an empty cell, make sure that at least one space character remains in the cell. In the first example below, row 2 of the table will be completely removed from the table unless at least one space (or any other character) is left inside the cell containing the conditional tags. In the second example, column 1 will be deleted because all the text in the only cell in the column is deleted. Column 2 will not be deleted, because one character is left over, and so the cell still has content. ![]() The key is content: If any content is left in a cell then its row or column cannot be deleted, because the content "protects" the cell, row and column from deletion. Applying conditions to the content of multiple cells:If you want to include/exclude the content of multiple cells you must include the IF and END conditions inside every cell! If a condition starts in one cell and ends in another cell, then the entire row or column will be deleted. This happens because rows and columns can be deleted using only an IF tag, without a closing END tag (see further below for details). ![]() |
To include or exclude an entire row or column you put the IF condition right at the beginning of the first cell in the row or column and the END condition at the end of the last cell in the row or column: ![]() Order of processing and intersecting tags:When Help+Manual processes your tags, it processes in order from left to right and top to bottom. You need to consider this sometimes when you are excluding both rows and columns with tag conditions that intersect with one another: Removing intersecting first row and second column: ![]() Removing intersecting first column and second row: ![]() |
If you want to apply conditions to multiple rows and columns you must include separate conditions for every row or column. You cannot start a condition in one row and end it in another! ![]() |
When you are tagging rows and columns the END tag at the end of the row or column is actually optional. As long as the tags are positioned right at the beginning of the first cell in the row or column, and there is no other END tag anywhere else in the row or column, they will be interpreted as tagging the entire row or column. For example, these tags will remove row 2 and column 2 in all outputs except PDF: ![]() Avoid "orphaned" tags within rows and columns!You should only use these unterminated tags in the first cell of a row or column (or the cell that becomes the first cell because another row or column has been removed). If you are tagging content in cells inside a row or column the IF tag should always be followed by a matching END tag inside the same cell. Failing to do so can have unexpected consequences. |
How columns and cells with merged cells are handled depends on which row or column the merged cell "belongs" to: •In rows the merged cell belongs to the first column that intersects the cell. •In columns merged cell belongs to the first row that intersects the cell. ![]() |
If you want to include or exclude an entire table, always put the IF condition before the table and the END condition after the table. Excluding all the rows and/or columns in a table will not exclude the table, it will only result in an empty table. ![]() |
There is one situation where you cannot exclude a row or a column with conditional text: This happens when merged cells prevent the first cell of a row or column from being in the first column or first row of the table. There is no way around this – it is just not possible to include/exclude these "partial rows/columns" with conditional text. It is not possible to include/exclude the 2-column row 4 in this table: ![]() For the same reason, it is not possible to include/exclude the 3-row column 2 in this table: ![]() |
See also:












