Table of Contents
SeaTable formulas offer you several ways to work with the data in your tables. One possibility is to search for words in a text. By entering an appropriate formula you can automatically search a text column for any words and have a hint - e.g. “word found/not found” - written as a result in a formula column of your table.
Search for a word in a text
In the concrete example, the goal is to search for a word in the text column “Request” using a formula.
To do this, first add a formula column to the table, in whose editor you can then insert the formula.
To search for a word in a text column, first add an If operator to the formula, which you can find in the formula editor under the Logical Functions tab. It examines whether a defined condition is true or not and returns a certain value depending on the positive or negative result.
In the next step you extend the formula with the function find, with the help of which the text column can be searched for a specific word. You can find the function in the formula editor at the text functions.
The two functions are followed in the formula by the specific word you want to search for in the text column. Write the word in quotation marks in the formula.
The next part of the formula is the name of the column that should be checked for the presence of the searched word. It is especially important that the column name is enclosed in curly braces, otherwise SeaTable will not be able to recognize which text should be checked using the formula.
Insert the mathematical equation 1 > 0
after the column name. This is important for the formula, as it indicates that a specific value is returned as soon as the searched word is found at least once in the text column. In the formula, make sure to close the bracket after the first number. The comparison characters ( > , < , = , etc.) can be found in the formula editor under operators.
Finally, you define in the formula the values that are returned to you in the formula column for finding or not finding the searched word in the text. The first value entered always appears in the formula column if the searched word was found in the text, the second value in the opposite case. Always place the values in quotation marks and separate them with a comma.
Before confirming, it is still important to note that you must close the parenthesis so that the formula is accepted as valid.
After confirming the entered formula, you can see from the value in the formula column whether the searched word was found in the text column.