Back Forward Home Print Search
Windows SharePoint Services 3.0 Help and How-to >  Formulas and functions
Examples of common formulas
Examples of common formulas

You can use the following examples in calculated columns of a list or library. Examples that do not include column references can be used to specify the default value of a column.

In this article


Conditional formulas

You can use the following formulas to test the condition of a statement and return a Yes or No value, to test an alternate value such as OK or Not OK, or to return a blank or dash to represent a null value.

ShowCheck if a number is greater than or less than another number

ShowReturn a logical value after comparing column contents

ShowDisplay zeroes as blanks or dashes

ShowHide error values in columns

 Top of Page

Date and time formulas

You can use the following formulas to perform calculations that are based on dates and times, such as adding a number of days, months, or years to a date, calculating the difference between two dates, and converting time to a decimal value.

ShowAdd dates

ShowCalculate the difference between two dates

ShowCalculate the difference between two times

ShowConvert times

ShowInsert Julian dates

ShowShow dates as the day of the week

 Top of Page

Mathematical formulas

You can use the following formulas to perform a variety of mathematical calculations, such as adding, subtracting, multiplying, and dividing numbers, calculating the average or median of numbers, rounding a number, and counting values.

ShowAdd numbers

ShowSubtract numbers

ShowCalculate the difference between two numbers as a percentage

ShowMultiply numbers

ShowDivide numbers

ShowCalculate the average of numbers

ShowCalculate the median of numbers

ShowCalculate the smallest or largest number in a range

ShowCount values

ShowIncrease or decrease a number by a percentage

ShowRaise a number to a power

ShowRound a number

 Top of Page

Text formulas

You can use the following formulas to manipulate text, such as combining or concatenating the values from multiple columns, comparing the contents of columns, removing characters or spaces, and repeating characters.

ShowChange the case of text

ShowCombine first and last names

ShowCombine text and numbers from different columns

ShowCombine text with a date or time

ShowCompare column contents

ShowCheck if a column value or a part of it matches specific text

ShowCount nonblank columns

ShowRemove characters from text

ShowRemove spaces from the beginning and end of a column

ShowRepeat a character in a column

 Top of Page