About constants in formulas
A constant is a value that is not calculated. For example, the date 10/9/2008, the number 210, and the text "Quarterly Earnings" are all constants. Constants can be of the following data types:
- String (Example: =[Last Name] = "Smith")
String constants are enclosed in double quotes and can be up to 255 characters.
- Number (Example: =[Cost] >= 29.99)
Numeric constants can include decimal places, and can be positive or negative.
- Date (Example: =[Date] <> 7/7/2002)
Date constants do not require delimiters.
- Boolean (Example: =IF([Cost]>[Revenue], "Loss", "No Loss")
Yes and No are Boolean constants. You can use them in conditional expressions. In the above example, if Cost is greater than Revenue, the IF function returns Yes, and the formula returns the string "Loss". If Cost is equal to or less than Revenue, the function returns No, and formula returns the string "No Loss".