check if two columns are equal by row and sum

MetLife

Active Member
Joined
Jul 2, 2012
Messages
319
Office Version
  1. 365
Hi,

I have two columns of data, "J10:J110" and "K10:K110".

In put column "L", I entered the formula "L10 = (J10=K10)*1" and "L11 = (J11=K11)*1", ....

Then I summed column L so that I could figure out the number of instances where they weren't matching. But I was thinking there must be a way to create a formula in a single cell that sums the total count of instances where the values are different.

There are two cases, one where the column data is "text" and the other where the column data is "numbers".

Does anyone know how to do this? I kind of wanted to avoid array formulas if possible because those were a little confusing to me.

Thanks,
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
But I was thinking there must be a way to create a formula in a single cell that sums the total count of instances where the values are different.
If you are searching for mismatches better try the below formula from Cell L10 and below -

Excel Formula:
=IF(J10<>K10,1,"")

And sum the range L10:L110

This way you can filter the records that mismatch...
 
Upvote 0
If you are searching for mismatches better try the below formula from Cell L10 and below -

Excel Formula:
=IF(J10<>K10,1,"")

And sum the range L10:L110

This way you can filter the records that mismatch...
Thats pretty much what I have in the spreadsheet.

But I want to make the spreadsheet design more succinct. So I want to replace summing range L10:L110 with a single formula in cell L9.

There must be a way of using sumproducts to do this.
 
Upvote 0
You can try :
Excel Formula:
=SUM((J10:J110<>K10:K110)*1)
 
Upvote 1
Solution

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top