Some help needed with comparieson (Formula NOT VBA)

zb134

New Member
Joined
Jun 23, 2014
Messages
38
Consider a table like shown
[TABLE="width: 500"]
<tbody>[TR]
[TD]Shipment No.[/TD]
[TD]Company[/TD]
[TD]Match[/TD]
[/TR]
[TR]
[TD]s1[/TD]
[TD]a[/TD]
[TD]exception[/TD]
[/TR]
[TR]
[TD]s2[/TD]
[TD]b[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]s3[/TD]
[TD]a[/TD]
[TD]exception[/TD]
[/TR]
[TR]
[TD]s2[/TD]
[TD]b[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

What I want to do is in the 'Match' column, check if the same company has the same shipment number or not. The actual record has approx 300 values.

In the above table, since company 'a' has two shipment numbers s1 and s3, I want it to be shown as an exception in the match column while company 'b' has the same shipment number so it passes.

Thanks a lot!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Will there only be two instances of a company? Or can there be thirty instances? If there are thirty, do all thirty have to be S1 (or similar) to not throw an exception?
 
Upvote 0
Will there only be two instances of a company? Or can there be thirty instances? If there are thirty, do all thirty have to be S1 (or similar) to not throw an exception?

There could be multiple instance of a company, what I have omitted is other columns like product code etc. But yes company A could be repeated 30 times and if even on of them is not the same shipment number, I want an exception for each corresponding col with the company. Hope that is clear.
 
Upvote 0
Code:
=IF(COUNTIF($B$2:$B$5,$B2)=COUNTIFS($B$2:$B$5,$B2,$A$2:$A$5,$A2),"","exception")

Simple enough. Column A is your Shipment No. and column B is your Company.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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