OpenOffice Calc: Compare two columns - how it works
In this practical tip we will show you how you can compare two columns with OpenOffice Calc. The free alternative to Microsoft's Excel can also cope with the popular "if" function.
OpenOffice Calc: Compare two columns
In the Spreadsheet Calc from OpenOffice you can compare two columns with the help of an if function and the associated comparison operators (for example =, ). With the integrated function wizard, the structure of the functions is very simple.
- Preparation: At the beginning you have to create a new column for the comparison. The results will be presented there later.
- Function Wizard: Click in the first empty cell of the newly created column. The if function for the first values is inserted there later. Then click on "Insert" -> "Function ..." in the menu bar. Alternatively, open the wizard with the keys [Ctrl] + [F2].
- Function: Select the "Logic" database under the "Category" menu item in the left-hand area of the Function Wizard. There is the if function, which can compare two values.
- Test values: After you have selected the "IF" function with a double click, you must specify which cells are to be considered for the comparison. Under "Check" enter the first cell of the first column (for example A2). Next, you have to choose a comparison operator. You can find an overview on Wikipedia, for example. Now you only have to enter the first cell of the second column (for example A2 = B2).
- Output: Under "Then_Value" and "Otherwise_Value" you specify what is output if the condition is true (Then_Value) or false (Otherwise_Value). A text output must be enclosed in two quotation marks (for example "text"). When you are finished with the function, click "OK" to confirm.
- Take over function: Finally, you only have to transfer the function to the next lines. To do this, click on the small box of the marked cell and drag the function over the complete comparison column.
If you would like to highlight the comparison visually, we will show you in another practical tip how you can use conditional formatting.