Z
Z
zimbura2020-06-11 14:06:12
Google Apps Script
zimbura, 2020-06-11 14:06:12

Script for copying Google Sheets data from a sheet in one book to another book, with checking the data for uniqueness?

There is

  1. book " sources "
  2. book id " Source " in Google docs " 2S7x6zcazUAOiUTZB1a53OnH58cIpOYChNV7diFugnNo "
  3. In the book "Sources" with id " 2S7x6zcazUAOiUTZB1a53OnH58cIpOYChNV7diFugnNo " there are sheets named " data " and " data2 "
  4. On the sheets " data " and " data2 " there are tables with an array of data in cells $A$2:$E or so A2:E


For info
in the first line A1:E1 the names of the columns, the tables in the two books are the same .

You need to
copy-add the data and check them for uniqueness on the fly

  1. copy the data to the book " Base "
  2. book id " Base " in google docs " 2N7x6zcazUAOiUTZB1a53OnH58cIpOYChNV7diFugnNo "
  3. On the sheet " Summary_data " at the bottom of the table in cells $A$2:$E or so A2:$E
The copied data is checked for uniqueness by column F on the sheet " Summary_data "
In column G , add the date and time of copying


To check the data, we concatenate columns A
; B; C (when copying to the book " Basic " this data is inserted into column F
;B3;C3)

In the book " Base " on the sheet " Summary_data " in column F for each row there is already concatenated data to check. If a duplicate for the data that is copied from the book " Source " is not found, add new data to the bottom of the table.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question