Formula Help: Need to combine two CountIF's within a IF/AND Statement

Johnny Thunder

Well-known Member
Joined
Apr 9, 2010
Messages
693
Office Version
  1. 2016
Platform
  1. MacOS
Hi,

I am working with a formula that I am getting some weird results and hopin someone has a solution.

I have two Concatenate formulas that combine about 3 Columns of data, These formulas are in Col J:K.

I then have two other columns that individually look at each concatenate formula nand determine if the value row by row is unique or a duplicate using this: =IF(A3=15660010,IF(COUNTIF(J:J,J3)>1,"Duplicate","Unique"),"") and =IF(A3=15660010,IF(COUNTIF(K:K,K3)>1,"Duplicate","Unique"),"")

What I was hoping to do is delete both columns with the CountiF statement and just have a single column that does a look up to the Concatenate columns at the same time and says "If(AND( Both Columns have a unique value then flag as unique, if not flag as "Duplicate"

The basis of the formula seemed pretty straight forward so I wrote it but I am noticing that if Column J is a "Duplicate" and Column K is a "Unique" the formula returns "Unique" which is wrong, both would need to be unique values for the formula to return "Unique"

Any ideas of the issue?

Here is the formula: =IF(A3=15660010,IF(AND(COUNTIF(J:J,J3)>1,COUNTIF(K:K,K3)>1),"Duplicate","Unique"),"")
 
You are right Peter. Originally that method was correct, I was working with the file today and noticed that the team I am supporting on this project changed the request and therefore they need the formula to say if either of the columns contains a "Unique" value then to flag as "Unique". Not sure if that is a flip in the "OR" statement part?
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Then doesn't your original formula at the bottom of post 1 do what you want?
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,657
Members
449,462
Latest member
Chislobog

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