Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to detect uniques and count the number of cells with duplicate data in Google Spreadsheets
    primarykey
    data
    text
    <p>Having a little issue with Google Spreadsheets.</p> <p>What I have is a column of data that has the some of the same values in it. What I want to detect is if that row is unique. If it is, echo 'unique' (or something) but if it's not count the number of duplicates in the column and echo that number.</p> <p>Example of what I want:</p> <pre><code>COL A RESULT COLUMN Apple Unique Banana Unique Banana 3 Banana 3 Cherry Unique Date Unique Date 2 </code></pre> <p>Example of what I have using this code (=IF(A1=A2, "Duplicate", "Unique")):</p> <pre><code>COL A RESULT COLUMN Apple Unique Banana Unique Banana DUPLICATE Banana DUPLICATE Cherry Unique Date Unique Date DUPLICATE </code></pre> <p>I guess what I really need is a query inserted(?) into where the 'Duplicate' text is in that formula that will count down the same cell values until it sees a different value, and echo that number.</p> <p>If it can be done within the same column excellent. If I need another column and have to perform 2 sets of queries I can compromise.</p> <p>Big thanks to those who can help.</p> <p>Dave</p> <p><strong>UPDATE BASED ON DATATOO ANSWER</strong></p> <p>I ran that query, modified column 'A' to 'E' and this is what returned.</p> <pre><code>City Country Merge Duplicate City Country Aberdeen, UK Unique Aberdeen, UK 2 Bangor, UK 2 Bath, UK Unique Belfast, UK Unique Birmingham, UK Unique Birmingham, UK Unique Birmingham, UK Unique Birmingham, UK Unique Birmingham, UK Unique Birmingham, UK Unique Birmingham, UK Unique Birmingham, UK Unique </code></pre> <p>As you can see this doesn't count right. Thoughts?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload