How do I remove non-duplicate cells in calc? the purpose is to delete all the rows that contain a value that exists only in one collumn. ie:

A     B
1     1
2     3
3     5
5     10
7     12

here the rows that contain 2,7,8,9 would be deleted

edit: I've been looking at function wizard, the answer may lie in the database category, but I don't understand most of it.


To do this for the first 127 (for 500 you get Err:512) rows, move to cell C1 and paste the stuff in the bottom. Then copy C1 down to the bottom of what you want to sort.

You will then get the value TRUE in cell Cx if the cell Ax has a value that occurs in one or more of B1,...,B127, else FALSE.

Next, go to the Data menu, and choose Sort... Under Sort key 1, choose column C. This will sort your table so all FALSE entries will be on top.

Then select A1 and B1, hold shift and scroll down until you reach the first TRUE field. Then hit delete.

You will be left with only the rows where the value in cell Ax occurs in one or more of the cells in column B.


  • I've edited the question again, hope is clear now. @Rasmus – Jo Rijo Oct 31 '12 at 17:37
  • How many rows do you have? – Rasmus Oct 31 '12 at 17:52
  • How is that relevant? sometimes 10 sometimes 500. – Jo Rijo Oct 31 '12 at 18:03
  • Because I don't know how to make Calc quantify over the cells, testing if there exists one with same value, but the same can be obtained by a long OR statement: =OR(A1=B$1,A1=B$2,A1=B$3,A1=B$4,...) but that get tedious for 500 rows... With appropriate length, this would give you what you are looking for. – Rasmus Oct 31 '12 at 18:18
  • Alright, that should do it, up to 500. Hooray for =A1+1 and text editors with for multi-line editing! – Rasmus Oct 31 '12 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.