Formula to find no matches different rows

Caly

Board Regular
Joined
Jul 19, 2015
Messages
159
Office Version
  1. 365
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
Hi I am working on a file where there are the same values in one column across different rows and I want to compare those to another column to see if there are different values. How can I do this?

column a will have a list of items some of which will be the same
Column b will have prices
In column c I want to compare the columns to find where If rows in column a match but the values in comlumn b do not match
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Depends what you want shown as the result.
Excel Formula:
=COUNTIFS(A:A,A2,B:B,"<>"&B2)
Will tell you how many entries that match A2 have a price different to that in B2, but not what those prices are or where they are found.
 
Upvote 0
Thank you. I used that formula which helped me to identify the count of items with and without the same value for the same item in the row for column a. I then did a countif against column a to count the number of instances for the item in column a; then I did an equals between the formula in column c and column d to see the variance.

Is there a way to highlight or conditional format a value for the same item in a row for column A where it doesn’t match the values in column b? So like if there are three instances in column A on three different rows where it is for Apple but the price in column B is the same for two rows but not a third row, is there a formula to note there is a difference and show what the minimum value should be?
 
Upvote 0
the price in column B is the same for two rows but not a third row, is there a formula to note there is a difference and show what the minimum value should be?
That could be interpreted in one of two ways, do you want to highlight the lowest price or the price that occurs less frequently?

Looking at it from a more complex angle, what if you had Apples in 6 rows with 3 different prices (each price appearing in 2 rows)?

Also, could you clarify which version of excel you're using? Newer versions have more functions available, which in turn increases the possibility of being able to find an answer to your question. When you have 4 different versions showing on your profile we don't know which (if any) is the correct one to use.
 
Upvote 0
Thank you so much. Attached is the file. I’m trying to highlight which rows are not a match and then also show the lowest price. My excel version is 2016
 

Attachments

  • 14D4BADD-D232-4CBD-BE5B-DBA2B0A5DFD1.png
    14D4BADD-D232-4CBD-BE5B-DBA2B0A5DFD1.png
    182.9 KB · Views: 10
Upvote 0
Try this one to return the lowest price for each item
Excel Formula:
=AGGREGATE(15,6,$B$2:$B$8/($A$2:$A$8=A2),1)
then you could use conditional formatting to highlight where the result of this formula is different to the price in column B.
 
Upvote 0
This is perfect wow yes both ways work and helped me finish a huge project. I am
Also able to apply this in other files too as a way to check for duplication against the same column across different rows.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,447
Members
448,966
Latest member
DannyC96

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