![]() | |||||
![]() ![]() ![]() ![]() ![]() |
Views of lists and libraries can display information calculated from the other information in the view. The view can automatically calculate the total for a column, and you can add calculated columns that use custom formulas.
When you create or edit a view, you can specify that a column display the total for that column. The total displayed can be:
Product | Product Code | Color | |
Chair | 1005 | blue | |
Table | 1007 | purple | |
Lamp | 1010 | green | |
Total | 3 |
Calculated columns display the results of mathematical or logical operations. The operations can include information from one or more other columns in a list as well as system functions such as [today] to indicate the current date. For example, if you want to add the value of column A with the value of column B, you can set up a calculated column to display the result. In the following example, the "Sum" column is the calculated column.
Column 1 | Column 2 | Sum |
1 | 2 | 3 |
10 | 20 | 30 |
16 | 16 | 32 |
The formula you would enter to create this calculated column is:
[column 1] + [column 2]
A calculated column enables you to perform operations on data in any other column. And the columns need not be side-by-side or even next to the calculated column.
You can also use other operations for creating calculated columns. For example, you can combine text found in two columns. For example, you can create a column that combines the text found in the columns First Name and Last Name, as in the following example.
Family Name | First Name | Full Name |
Harrington | Mark | Harrington, Mark |
Pak | Jae | Pak, Jae |
Reinhart | Marie | Reinhart, Marie |
You can combine the text in the first two columns by entering the following formula for the calculated column:
[Family Name] & ", " & [First Name]
The logical & (AND) operators in this formula combine the text in the first column with a comma and space, and then the text from the second column.
You can also create calculated columns that work with calendar dates. In the following example, the calculated column automatically fills in the date when a business process will be completed. The formula assumes that the process takes seven days to complete.
Date Submitted | Work Complete |
12/05 | 12/12 |
12/06 | 12/13 |
12/07 | 12/14 |
The formula for this calculated column is:
[Date Submitted] + 7
Note When entering a specific date into a calculation, make sure you use the date function. For example, to enter the date November 2, 2004, you would enter: =DATE(2004,11,02)