To quickly propagate the formula across all desired cells in the column, select cell C1 (which now contains the formula) so that a bounding box appears around the cell. That takes care of the first row, but if we had to manually enter the formula into each cell in column C, we might as well do a visual inspection, it would take the same amount of time.įortunately, Excel offers a quick and easy way to copy the formula. We can thus start by entering our formula into cell C1, which results in the boolean value FALSE being printed, and is the outcome of the comparison of cells A1 and B1 for equality. To display the results of the comparison of adjacent cells between column A and column B, we will use column C. In our sample sheet, cell A1 contains the number 10 and cell B1 contains the number 11. The first equals sign merely indicates that this is a formula, while the formula itself is testing for whether the contents of cell A1 are equal to the contents of cell B1. Referring to the comparison operators table, in the example column when comparing for equality between two cells, the formula is given as follows: So let’s leverage the real power of spreadsheets, that of formulas. While looking for values that are equal (or not) is relatively easy, looking for whether the value in one cell is less than, more than, less than or equal to, more than or equal to the value in another cell, creates an even greater degree of difficulty.Īnd if that’s not enough, the columns containing the data may not necessarily be next to each other, making visual comparison extremely difficult, slow, and more importantly, error prone. While doing a visual comparison may work for a small range of data, it is far more common for spreadsheets to comprise large sets of data spanning a hundred or more rows. Inspecting the sheet visually looking for equal values, we can see that columns A and B have a match at rows 4, 7, 10, and 15. We will be using this sheet as our sample data to show how the comparison operators work. The following is a sample sheet with two columns containing cells with random numbers (between 10 and 19 inclusive), as well as some cells with text. There are six operators available in Excel, that allow a comparison between the values contained in two cells.Ĭomparisons result in a TRUE or FALSE being returned (referred to as a boolean type), although as we’ll see later, the output can also be programmed to produce something more meaningful. Excel Comparison OperatorsĪpart from comparing two values to determine whether they are the same or not, comparisons can also be made to see whether one value is greater or less than another value, as well as whether a value is greater than or equal to, and less than or equal to another value. Have sales gone up, have they gone down, or have they remained the same?Īs with any good software, Excel provides a few ways to perform comparisons and we’ll be taking a close look at these.īefore we dive in though, it would be a good idea to first get a basic understanding of Excel’s comparison operators. The data may be weekly or monthly sales figures in a report and there is a need to compare the current period’s figures against those of the previous to produce some kind of indicator. Spreadsheets mainly comprise of tabulated data, so it is only natural that at some point a comparison between the data contained in two columns is going to be required.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |