how to see if there's any unique values

bigdan

Well-known Member
Joined
Oct 5, 2009
Messages
846
Office Version
  1. 2013
Platform
  1. Windows
I've got data like this below.

All the weights are supposed to be consistent. So for example all 3 pound weights are supposed to be $5, regardless of province. But there could be an error somewhere, such as in the last line.

Is there a way to simply find all the difference prices for each weight? At the moment I'm filtering the Weight column and going through each bucket one by one, which kinda works. But with 50 buckets it's not the easiest way.



[TABLE="width: 500"]
<tbody>[TR]
[TD]Prov[/TD]
[TD]Weight[/TD]
[TD]Price[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ON[/TD]
[TD]3[/TD]
[TD]$5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ON[/TD]
[TD]5[/TD]
[TD]$10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PQ[/TD]
[TD]3[/TD]
[TD]$5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PQ[/TD]
[TD]5[/TD]
[TD]$10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BC[/TD]
[TD]3[/TD]
[TD]$15[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
You could put a formula similar to this in column D (or further to the right wherever the first open column is)

=COUNTIFS($B$2:$B$6,B2,$C$2:$C$6,"<>"&C2)

update the 6 to whatever the final row is of your data OR best practice, define your data range as a dynamic range.

You can then filter on this new column for any values that are not zero as these will be Weights with differing Price values.

NOTE: I am assuming you are using a newer version of Excel which is able to use the COUNTIFS formula. If not, I can modify it into a slightly more complicated array formula that works on older versions.
 
Last edited:
Upvote 0
Thanks!

I tried this in a made up environment but didn't understand the result, which said 2,0,2,0,2.

What do I do with that?
 
Upvote 0
Thanks!

I tried this in a made up environment but didn't understand the result, which said 2,0,2,0,2.

What do I do with that?

Filter to any non-zero values and these will be your potential errors.

Alternatively, if you want a simpler flag you could bound it with an IF like so

=IF(COUNTIFS($B$2:$B$6,B2,$C$2:$C$6,"<>"&C2)=0,"OK","MULTIPLE")
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,107
Members
452,302
Latest member
TaMere

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