Creating and Using Report Tables
Entering User-defined Formulas
Tip:
In order to use the options described below, the Report Publisher add-on product must be installed on your computer.
Creating user-defined formulas is analogous to the Microsoft Excel spreadsheet. The following description is intended for users who are not familiar with entering formulas:
Example 1:
Let's assume that a table containing two columns (A and B) and three lines (1 to 3) is extended by one column (C), for which there is no Chromeleon report variable. Thus, for example, the quotient of the cell contents of columns A and B can be included in column C.
To enter a formula in a cell, select the corresponding cell first. In this example, select the cell C1. Enter the equal sign. The entire input is displayed in the edit line (here indicated in blue print).
C1 |
= |
||
|
A |
B |
C |
1 |
12 |
5 |
|
2 |
17 |
10 |
|
3 |
13 |
20 |
|
4 |
|
|
|
Select the cell A1, enter a division sign (slash), select the cell B1, and complete your input by pressing <Enter>. The formula (C1=A1/B1) is displayed in the edit line; the cell C1 displays the result of the operation (2.4). The cursor moves to cell C2.
C1 |
=A1/B1 |
||
|
A |
B |
C |
1 |
12 |
5 |
2.4 |
2 |
17 |
10 |
|
3 |
13 |
20 |
|
4 |
|
|
|
Follow the description to output the corresponding results in the cells C2 and C3. To facilitate the procedure, click the cell C1 again, grab the selection frame on the lower right corner, and drag it to the required cells (C2, C3). For calculating the cell values, Chromeleon uses the previously entered formula and automatically creates the correct reference, line by line.
C1 |
=A1/B1 |
||
|
A |
B |
C |
1 |
12 |
5 |
2.4 |
2 |
17 |
10 |
1.7 |
3 |
13 |
20 |
0.65 |
4 |
|
|
|
Example 1 (continued)
How to sum the cells of column C in the field C4:
Select the cell C4 and enter an equal sign. Enter the SUM command required for adding cell values and enter an opening bracket.
C4 |
=SUM( |
||
|
A |
B |
C |
1 |
12 |
5 |
2.4 |
2 |
17 |
10 |
1.7 |
3 |
13 |
20 |
0.65 |
4 |
|
|
|
Select all cells (C1, C2, C3) that you want to sum up. Close the bracket after the last cell. Press <Enter> to complete your input.
C4 |
=SUM(C1:C3) |
||
|
A |
B |
C |
1 |
12 |
5 |
2.4 |
2 |
17 |
10 |
1.7 |
3 |
13 |
20 |
0.65 |
4 |
|
|
4.75 |
In addition to the SUM command, many other functions are entered in the same way. Thus, you can form the average (see AVERAGE), express conditions (see IF, True, FALSE), create logical operations (see AND, OR), or enter time values (see TIME, DATE, DAY, YEAR).
Tip:
For an alphabetical list of the available formulas, refer to Additional Functions.
Example 1 (continued)
Besides, it is also possible to use "fixed references." Contrary to the variable value pairs described above (A1/B1, A2/B2, A3/B3), form the quotient of a variable and a fixed value (A1/C4, A2/C4, A3/C4). In this example, the result is displayed in column D.
Follow the description for Example 1 above to create the first cell reference (D1).
D1 |
=A1/C4 |
|
||
|
A |
B |
C |
D |
1 |
12 |
5 |
2.4 |
2.5263 |
2 |
17 |
10 |
1.7 |
|
3 |
13 |
20 |
0.65 |
|
4 |
|
|
4.75 |
|
Extend the formula by adding two $ signs. They convert a variable reference into a fixed cell reference.
D1 |
=A1/$C$4 |
|
||
|
A |
B |
C |
D |
1 |
12 |
5 |
2.4 |
2.5263 |
2 |
17 |
10 |
1.7 |
|
3 |
13 |
20 |
0.65 |
|
4 |
|
|
4.75 |
|
When the formula is copied, the reference to cell C4 will be retained. To calculate the fields (D2 and D3), simultaneously select the cells D1, D2, and D3.
D1 |
=A1/$C$4 |
|
||
|
A |
B |
C |
D |
1 |
12 |
5 |
2.4 |
2.5263 |
2 |
17 |
10 |
1.7 |
3.5790 |
3 |
13 |
20 |
0.65 |
2.3768 |
4 |
|
|
4.75 |
|
For practical examples, refer to:
Calculating the Percentage Value for the Amount (for Identified Peaks)
Calculating the Percentage Value for the Concentration (in Relation to the Total Concentration)