Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Function that takes all rows with a specific value in a column and searches if there is more than one value in another column

I need to do an analysis of a very big set of data. In column1 I have the reference number. I want to find all rows with the same value in column1. Then I want to search column2 to see if there is more than one value for that specific value in column1.

I have an example here:

Example

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

So for all the "1"’s in column1 they all have the same value in column2 ("a"). Therefore it should return "TRUE". However all the rows with "2" have different values in column2 and it should return FALSE.

I hope this makes any sense.

>Solution :

Try below formula.

 =COUNTA(UNIQUE(FILTER($B$2:$B$19,$A$2:$A$19=D2)))=1

If you do not have FILTER() and UNIQUE() then try this one for non 365 version of excel.

=SUMPRODUCT(($A$2:$A$19=D2)/(COUNTIFS($A$2:$A$19,$A$2:$A$19,$B$2:$B$19,$B$2:$B$19)))=1

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading