compile a list from several workbooks, with no duplicates

Asked by Samson Muyanga

I would like to create a master list from 30 spreadsheets, containing only columns A, E and F, without duplicating common entries. The lists are found in worksheet 2 of each workbook to be compared.

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Tony Pursell
Last query:
Last reply:
Revision history for this message
Best Tony Pursell (ajpursell) said :

Hi Samson

See a previous answer of mine:

The second part of the answer is relevant to you, i.e a file with duplicates removed.

What you will need is to concatenate the csv files from each spreadsheet with a command like

cat file1.csv file2.csv file3.csv > allfiles.csv


sort allfiles.csv | uniq > nodupes.csv

Note my remark that the original order of rows can be lost.

You will,have to collect the data from columns A, E, and F onto a separate worksheet first. Then you will need to open up that worksheet of each file and Save As > Text CSV. Only the current worksheet is saved as CSV.

Hope that helps


PS If this answers your question, please mark it as Solved

Revision history for this message
Samson Muyanga (samson-sanbi) said :

Hi Tony,

Your script worked perfectly. My problem is solved.
Thanks a million.