Fresh Excel Tips

Quick and Easy Excel Tips and Tutorials

Use the IF function to compare columns and return a result

In this example, we will be using the IF function to compare columns and return a specific result instead of the standard TRUE or FALSE. We will have values in column A and B and we will compare them to see if if Column A is greater than or equal to Column B or if Column B is greater than A. Here is how we’ll achieve this. We will return the results of the formula in Column C.

How to compare columns and return a custom result

  1. Enter your values in Column A and B from row 1 - 10.
  2. Select Cell C1 and enter the following formula: =IF(A1>=B1,”Column A is greater or equal”,”Column
    B is greater”).
  3. Press Enter. Use the fill handle to copy the formula to row 10.

Your custom result will be returned in the adjacent Column C if Column A or Column B has the larger value. This tip should work in Excel 97, 2000, 2003 and 2007. Apply and modify for use in your own worksheets. Thanks.

Use the IF function to compare columns and return a result
  1. How to Use the AND Function to Compare Columns in Excel
  2. Using the EXACT function to compare two columns in Excel
  3. Use the ISODD and COLUMN functions to determine odd columns
  4. How to use the PV function to compare investments in Excel
  5. How to count sets of cells located in two columns in Excel

1 Trackbacks & Pingbacks

  1. August 3, 2008 4:52 pm

    Using the EXACT function to compare two columns in Excel » Fresh Excel :

0 Comments

Leave a Reply