A formula is an expression used to perform an operation by computing values between different fields in a table.The Formula Field in Zoho Tables allows you to compute the results of the formula entered and displays those results in that field.
It supports over 30 formulas now. Zoho Tables formulas are applied to the entire field of the table. This means that each record (cell) in the field gets updated when you use a formula. In a nutshell, formulas allow you to automate your workflow to speed up your process.
Note: The formula field's records are associated with the reference field's records (same row). You cannot associate Record 1 (in row 1) of the formula field to Record 2 (in row 2) of the reference field.
This section will walk you through the benefits of using Formula Field Type and how you can calculate just about anything.
- Formula Editor
- What are the formula field outcomes?
- General Rules to follow for formulas
- Formula Use case
- Different types of formula
The Formula Editor is the space in the Formula Field dialog box where you type in the formula and functions. Let us look into some of the functions and capabilities of the Formula Field Editor.
- Colored Syntax Highlighter
- Error Alerts
Colored Syntax Highlighter

As given in the above image,
Green indicates the functions
Black indicates fields
Grey denotes the reference field that has been deleted.
Red indicates an error message.
Error Alerts:
- The parenthesis are not balanced.
- The formula entered is incorrect (Unknown characters are present in the formula).
- Improper string termination. (The entered formula string is not terminated properly with " or ')
- There are insufficient parameters to perform the function.
- Too many parameters have been given to this function.
- The reference field is either incorrect or deleted from the table.
- The Field type is mismatched.
- The Formula entered includes a reference to itself.
The Formula field type dialog box changes according to the Field type you enter. There are three types of Formula Field outcomes —
- Numerical Field outcome
- Text Field Outcome
- Date Field Outcome
Numerical Field outcome

- Enter your formula: Enter the formula or function you want to compute.
- Return Type: This will return the format type you want in the output. E.g., if you choose percent, then the output would be 75%.
- Precision: Precision denotes the number of decimals displayed in the number field. E.g., For 345.0, if you select 1.000 then the output would be 345.000
- Enable Thousand Separator: Enable a thousand separator to your numbers. E.g., 10000 will show as 10,000 where the comma is the thousand separator.
Text Field Outcome

- Enter your formula: Enter the formula or function you want to compute.
- Format: Choose the format you want your text to be in from the drop-down menu, which includes — None(whatever you typed will be displayed without applying any format), Capitalize Each Word, lowercase, UPPERCASE and Sentence case.
Date Field Outcome

- Enter your Formula: Enter the formula or function you want to compute.
- Date Format: Choose the format you want your date to be in from the drop-down menu, which includes — Month DD, YYYY, DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD.
- Time Format: Choose the format you want your time to be in from the 3 options, which include — None, 12hr, and 24hr.
There are different types of formulas in Zoho Tables. They are explained in detail in the sections below:
- Array Functions
- Text Operators and Functions
- Logical Operators & Functions
- Numeric Operators & Functions
- Date and Time Functions
ARRAY FUNCTIONS:
- ARRAY_JOIN([item1, item2, item3], separator)
- You can merge the array of items into one text with a separator between them.
Eg., ARRAYJOIN(Supplier Name,Supplier Surname, "; ")

TEXT OPERATORS AND FUNCTIONS
- CONCATENATE(text1, text2,...)
- You can join two different texts together to make them into one text value.
- E.g., CONCATENATE("Hi"," ", "there", "!")
- => Hi there!

- FIND(textToFind, whereToSearch,[startFromPosition])
- This formula finds an occurrence of text inside another text.
- textToFind: The text whose occurrence is to be found.
- whereToSearch: The text in which the search is performed.
- [startFromPosition]: (Optional) It starts searching from this position. Index starts from the position that you give. If not provided, it defaults to 1.
Eg., FIND("John", Supplier Name)

In the above use case, if John's name is found in the field, it gives you the position of the word.
Note: If the text occurrence is not found then the output will be 0.
- LEN(text)
- You can find the length of the text using this formula.
Eg., LEN(Supplier Name)

Note: If there is a space between the texts that will also be counted.
- LOWER(text)
- You can change the text to lowercase using this formula.
Eg., LOWER("Good morning!")

- UPPER(text)
- You can change the text to uppercase using this formula.
Eg., UPPER("What?")

- MID(text, whereToStart, count)
- You can take out a subtext within a text starting from whereToStart.
- text: The text will be cut.
- whereToStart: The starting position of the cut.
- count: Number of characters from starting position.
Eg., MID(Supplier Name, Where to Start, Count)

- SUBSTITUTE(whereToSearch, oldText, newText, [index])
- You can replace a text occurrence with a new text.
- whereToSearch: The text in which the search is performed.
- oldText: The text to be searched for.
- newText: The text to be replaced with.
- index(optional): If the same occurrenc (text) exists more than once, you can specify which occurrence to replace. If not specified, all occurrences will be replaced.
Eg..

LOGICAL OPERATORS AND FUNCTIONS
- AND(logical1, logical2,...)
- If all the fields have a value in them, the formula will return a 1 since all the arguments are true; otherwise a 0. Empty field values and 0's are treated as 0(False).
- Eg.,
- AND("a", "b")
- => 1 (True, only if both field values are true)
- AND("a", "")
- => 0 (False, when one or both field values aren't true)
In the below table, the Error Check field uses the AND formula to check if there are any empty records in the selected fields. The Error Check field returns 0 if any one of the records is empty.

- NOT(boolean)
- Using this function, an argument's logical meaning can be reversed.
- E.g., Generally, 300 > 277 would be true, but if you wrote
- NOT("300 > 277")
- => 0 (False)

In the above table, we use the NOT formula to find clothes that are not yellow in color.
i.e., NOT(Color="Yellow") => O when the cloth color is yellow
NOT(Color="Yellow") => 1 when the cloth color is not yellow
This helps to count the number of clothes that are not yellow in color.
- OR(logical1, logical2,...)
- OR() returns 1(True) if one or all field values/arguments are true. If all the values/arguments are false, it returns 0 (False).
Eg., OR(Warehouse 1,Warehouse 2)

In the above table, we use the OR formula to check if the stock is available in Warehouse 1 or Warehouse 2. If it's available even in one Warehouse, it will show the output as 1 since the stock is available.
- XOR(logical1, logical2,...)
- Using this function, your output returns 1 (True) if an odd number of arguments are true.
For example,
- If you are a Student, who has cleared both Unit Test 1 and Unit Test 2, then you're exempted from writing Unit Test 3.
- If you have cleared only one unit test, then you have to give Unit Test 3.
- If you have not cleared both Unit Test 1 and Unit Test 2, then you are not allowed to give Unit Test 3.

Now, in the above use case, you can use the XOR function for the Unit Test 3 field :
where the output would show as 1(True) if one (Odd number) field value is missing or 0(False) if both (Even number) field values are missing or available. i.e., XOR(Unit Test 1, Unit Test 2)
NUMERIC OPERATORS AND FUNCTIONS
- ABS()
- You get the absolute value (non-negative value without regard to its sign) as the output.
Eg., ABS(Profit)

- AVERAGE(number1, number2,...)
- You can find the average of the total numbers given, which is calculated by,
- sum of the values/total number of values.
Eg., AVERAGE(Stock, Leftover Stock)

- MAX()
- You can find the largest number among the given numbers.
Eg., MAX({Field1}, {Field2})
MAX(24, 56)
=> 56

- MIN(number1, number2)
- You can find the smallest number among the given numbers.
Eg., MIN(24, 56)
=> 24

- MOD(dividend,divisor)
- After dividing the first input by the second, you can find the remainder as the output
Eg., MOD(Stock, Leftover Stock)

- POWER(base, power)
- You can find the base value for the specified power.
Eg., POWER(BASE, Power of)

- ROUND(value,precision)
- You can find the round-off value to the specified decimal places.
Eg., ROUND(Numbers, Precision)

- SUM(number1, number2,...)
- You can find the sum of the given numbers as output.
Eg., SUM(Stocks Warehouse 1, Stock Warehouse 2)
DATE AND TIME FUNCTIONS
- DATE_ADD(date, number, 'units')
- You can add the date units to return another date in specified units.
- date: The date to which the value is added.
- number: The number which is added.
- units: The unit to which the number is scaled. It should be one of ["YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND"].
Eg., DATE_ADD(Stock Expiry, "6", "day")

- DATETIME_DIFF(date1, date2, 'units')
- You can find the difference between two dates in the units that you specify.
- date1: First date.
- date2: Second date.
- units: The unit in which the difference is returned. It should be one of ["YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND"].
Eg., DATETIME_DIFF(Date of stock purchase, Stock Expiry, "day")
- YEAR(date field)
- You can determine a date's 4-digit year using this formula.
Eg., YEAR(Stock Expiry)

- MONTH(date field)
- Your output will be displayed between 1 and 12 representing only the month from the date field.
Eg., MONTH("14/09/2016 9:45")
=> 9

- DAY(date field)
- In this case, the output will display only the day between 1- 31 from the date field.
Eg., DAY(Stock Expiry)

- HOUR(date time field)
- The output will range from 0 (12:00 am) to 23 (11:00 pm), representing the time in hours.
Eg., HOUR(Field 14)

- MINUTE()
- The output will be between 0 to 59, representing only the minute of the time.
Eg., MINUTE(Field 14)

- SECOND()
- The output will be between 0 to 59, representing only the seconds of the time.
Eg., SECOND(Field 14)
