[SOLVED] How to find field entries in a column in 1.ods which are not in 2.ods?

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
InChrist
Level 4
Level 4
Posts: 208
Joined: Wed Apr 12, 2017 4:17 pm
Contact:

[SOLVED] How to find field entries in a column in 1.ods which are not in 2.ods?

Post by InChrist » Sun Aug 12, 2018 11:28 am

Hi :-)

I want to find out the email addresses in a file which are not in a specific other file (csv, ods, odt, one of these would be enough for me as I can convert them easily).

Blessings, Klaus
Last edited by InChrist on Sun Aug 12, 2018 3:14 pm, edited 1 time in total.
I would be happy to receive competent clear help.
HP-ProBook-470-G3
Kernel: 4.13.0-39-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3) dm: lightdm
Distro: Linux Mint 18.3 Sylvia
(inxi -Szxx from 180425)

User avatar
xenopeek
Level 24
Level 24
Posts: 23101
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: How to find field entries in a column in 1.ods which are not in 2.ods?

Post by xenopeek » Sun Aug 12, 2018 11:49 am

There are various ways to do this. One way is to create two text files, copying a list of email addresses into each each, and comparing them with the comm command. Say you have file1.txt and file2.txt, you would run the command as follows:
comm -3 file1.txt file2.txt
That will show you the email addresses only in file1.txt (on the left) and the email addresses only in file2.txt (on the right). If you get a warning that either or both files are not sorted, run the command instead as such to have them properly sorted first:
comm -3 <(sort file1.txt) <(sort file2.txt)

You can of course also do it in LibreOffice Calc directly, using the VLOOKUP function. You can consult the help https://help.libreoffice.org/Calc/Sprea ... ns#VLOOKUP or look at examples from others, like this one is detailed: https://www.ryananddebi.com/2018/06/21/ ... g-vlookup/

If you have to compare the list repeatedly, doing it with VLOOKUP may make more sense. If it just a one-off I'd just copy & paste the two lists of email addresses and run the comm command. That will be quicker to do and is less error prone.
Image

InChrist
Level 4
Level 4
Posts: 208
Joined: Wed Apr 12, 2017 4:17 pm
Contact:

Re: How to find field entries in a column in 1.ods which are not in 2.ods?

Post by InChrist » Sun Aug 12, 2018 3:13 pm

Thank you, xenopeek.
I tried with Calc according to your 2 links. It worked well for me.
:-)
I would be happy to receive competent clear help.
HP-ProBook-470-G3
Kernel: 4.13.0-39-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3) dm: lightdm
Distro: Linux Mint 18.3 Sylvia
(inxi -Szxx from 180425)

Post Reply

Return to “Software & Applications”