Question

I have 2 cells of temperature and salinity.

Sal      Temp      
34,9882  -1,4744      FALSE
34,9883  -0,0721      FALSE
34,9884  -0,8864      TRUE
34,9884  -0,8864      TRUE
34,9888  -1,5913      FALSE
34,9888  -1,5946      FALSE

Here I have sorted them according to Sal from lowest to highest. As you can see rows 3 and 4 have the same sal and temp. How can I identify such rows which are the same in a excel template with thousands of rows? (If the sal is the same but temp different e.g. rows 5 and 6, then it is FALSE) Ideally all the data are not sorted. I tried sorting but obviously this is not a good solution as you still have to identify by eye. I am only at =EXACT(A1;A2) and this only sees if any sal are the same but not if temp are also the same.

Was it helpful?

Solution

If you don't mind adding an additional column, then in column D (assuming your data is in col A:C) use the formula

=COUNTIFS($A$2:$A$7;"="&A2;$B$2:$B$7;"="&B2)

Be sure to change A7 and B7 to the end of your range. This counts how many repeats match the condition of what is in column A and B for the current row. Unique rows will evaluate to 1, while anything with a repeat will be 2/+. Data does not have to be sorted for this to work. Note that it only identifies duplicates in a generic sense (a specific "clone group" is not uniquely identified against another clone group), but you'll know how many duplicates there are for that set of data (Sal of 349,884 and temp of -0,8864).

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top