I'm using an IMPORTDATA function tied to a auto-running script to pull in a .TSV data file from an obscure webform system. That all works well, and I'm able to generate a nice dashboard from this data.

However, the way the originating system works is causing some problems. When someone updates their data, instead of making the updates in the original row in the TSV, the originating system creates a new row with a new timestamp (and the new data). I can see that they're duplicates because the rows both have the same primary key (email address), but I can't figure out how to merge the rows and/or delete the older row, keeping only the newer one.

Google is failing me on figuring out what functions to use here. Any advice?

  • 1
    Does this answer your question?
    – user79865
    Feb 24 '16 at 20:10
  • 1
    Here is another answer to a similar question, with two suggestions: script and unique/vlookup. One can also use query, sorting by timestamp and returning the last one: something like query(A:F, "select * where E='"&F1&"' order by A desc limit 1")
    – user79865
    Feb 24 '16 at 20:53

Browse other questions tagged or ask your own question.