How to Compare Two Columns in Microsoft Excel

When you need to match values in numerous columns in Microsoft Excel, you’ll use extra than simply your eyeballs. You’ll spotlight distinctive or reproduction values, show True or False for suits, or see which actual values seem in each columns.

We’ll display you easy methods to evaluate two columns in Excel the usage of 5 other strategies. This allows you to select the one who absolute best suits your wishes and the knowledge to your Excel worksheet.

Desk of Contents

Spotlight Distinctive or Reproduction Values With Conditional Formatting

If you wish to spot the duplicates or the original values to your columns, you’ll arrange a conditional formatting rule. If you see the values highlighted, you’ll take no matter motion you want.

The usage of this system, the guideline compares the values within the columns total, no longer in keeping with row.

  1. Make a selection the columns you need to match. Then, cross to the House tab, open the Conditional Formatting drop-down menu, and select New Rule.
  1. Pick out Structure most effective distinctive or reproduction values on the best of the New Formatting Rule field.
  2. Within the Structure all drop-down field, select both distinctive or reproduction, relying on which you would like spotlight.
  1. Make a selection the Structure button and use the tabs to select the formatting taste you need. For example, you’ll use the Font tab to select a colour for the textual content or the Fill tab to select a colour for the cells. Make a selection OK.
  1. You’ll then see a preview of the way your distinctive or reproduction values will seem. Make a selection OK to use the guideline.

Whilst you see the values highlighted, you’ll take motion on them as you please. On this instance, we’ve stuffed the cells with reproduction values yellow.

Examine Columns The usage of Move To Particular

If you wish to see the variations to your columns through row, you’ll use the Move To Particular function. This briefly highlights the original values with the intention to do what you want.

Have in mind, the usage of this system, the function compares the values in keeping with row, no longer total.

  1. Make a selection the columns or cells within the columns you need to match. Move to the House tab, open the In finding & Make a selection drop-down menu, and select Move To Particular.
  1. Within the conversation field that looks, pick out Row variations and make a selection OK.
  1. You’ll then see cells within the rows decided on in the second one column which might be other from the primary.

You’ll take motion instantly in case you most effective have a couple of variations. When you have many, you’ll stay the cells decided on and select a Fill Colour at the House tab to completely spotlight the cells. This offers you extra time to do what you want.

Examine Columns The usage of True or False

Perhaps you would like in finding suits and variations to your dataset with out font or mobile formatting. You’ll use a easy components and not using a serve as to show True for values which might be the similar or False for those who aren’t.

The usage of this system, the components compares the values in keeping with row, no longer total.

  1. Move to the row containing the primary two values you need to match and make a selection the mobile to the best.
  1. Sort an equivalent signal (=), the primary mobile reference, any other equivalent signal, and the second one mobile reference. Then, press Input or Go back to peer the outcome. For instance, we’ll evaluate cells A1 and B1 the usage of the next components:

=A1=B1

  1. You’ll then use the fill take care of to replicate and paste that components to the remainder cells within the columns. Both drag the fill take care of downward to fill the cells or double-click it to routinely fill the remainder of the cells.

You’ll then have a True or False in that column for every row of values.

Examine Columns The usage of the IF Serve as

For those who just like the above way for appearing a easy True or False in your values, however wish to show one thing other, you’ll use the IF serve as. With it, you’ll input the textual content you need to turn for reproduction and distinctive values.

Just like the above instance, the components compares the values in keeping with row, no longer total.

The syntax for the components is IF(check, if_true, if_false).

  • Take a look at: Input the values you need to match. For locating distinctive or reproduction values, you’ll use the mobile references with an equivalent signal between them (proven beneath).
  • If_true: Input the textual content or worth to show if the values fit. Position this inside of citation marks.
  • If_false: Input the textual content or worth to show if the values don’t fit. Position this in quotes as smartly.

Move to the row containing the primary two values you need to match and make a selection the mobile to the best as proven previous.

Then, input the IF serve as and its components. Right here, we’ll evaluate cells A1 and B1. If they’re the similar, we’ll show “Similar” and in the event that they’re no longer, we’ll show “Other.”

=IF(A1=B1,”Similar”,”Other”)

If you obtain the outcome, you’ll use the fill take care of as described previous to fill the remainder cells within the column to peer the remainder of the effects.

Examine Columns The usage of the VLOOKUP Serve as

Yet another option to evaluate columns in Excel is the usage of the VLOOKUP serve as. With its components, you’ll see which values are the similar in each columns.

The syntax for the components is VLOOKUP(lookup_value, array, col_num, fit).

  • Lookup_value: The worth you need to appear up. You’ll get started with the mobile at the left of that row after which reproduction the components down for the remainder cells.
  • Array: The variety of cells to appear up the above worth.
  • Col_num: The column quantity that comprises the go back worth.
  • Fit: Input 1 or True for an approximate fit or 0 or False for a precise fit.

Move to the row containing the primary two values you need to match and make a selection the mobile to the best as proven previous.

Then, input the VLOOKUP serve as and its components. Right here, we’ll get started with mobile A1 within the first column for a precise fit.

=VLOOKUP(A1,$B$1:$B$5,1,FALSE)

Understand that we use absolute references ($B$1:$B$5) somewhat than relative references (B1:B5). That is so we will reproduction the components right down to the remainder cells whilst holding the similar vary within the array argument.

Make a selection the fill take care of and drag to the remainder cells or double-click to fill them.

You’ll see that the components returns effects for the ones values in column B that still seem in column A. For the ones values that don’t, you’ll see the #N/A error.

Not obligatory: Upload the IFNA Serve as

If you would like show one thing rather then #N/A for non-matching knowledge, you’ll upload the IFNA serve as to the components.

The syntax is IFNA(worth, if_na) the place the worth is the place you’re checking for the #N/A and if_na is what to show if it’s discovered.

Right here, we’ll show an asterisk as an alternative of #N/A the usage of this components:

=IFNA(VLOOKUP(A1,$B$1:$B$5,1,FALSE),”*”)

As you’ll see, we merely insert the VLOOKUP components as the primary argument for the IFNA components. Then we upload the second one argument, which is the asterisk in quotes on the finish. You’ll additionally insert an area or different persona inside of quotes in case you favor.

The usage of integrated options or Excel formulation, you’ll evaluate spreadsheet knowledge in numerous techniques. Whether or not for knowledge research or just recognizing matching values, you’ll use one or all of those strategies in Excel.