1

Currently I have:

Sheet 2 with a table of people's times running round Track A (names in one column and times in another) and Sheet 3 with a table of people's times running round Track B (same layout). Assuming that both tracks are the same distance, I'd like to be able to have Sheet 1 combine the two tables automatically to only show each person's fastest time (as well as which track that time was on).

Californ1a
  • 31
  • 4
  • What do you mean automatically combine? Would you be open to using a formula or are you dead set on having a script. Under what circumstances should it update/recombine the two tables? – N8sBug Jun 06 '14 at 21:53

2 Answers2

0

You have three possibilities :

1) Create a Google App Script to copy multiple column in the other sheet. For this , you need the documentation. https://developers.google.com/apps-script/reference/spreadsheet/

2) Use the Google Spreadsheet function "ImportRange"

3 ) Use the Query language https://developers.google.com/chart/interactive/docs/querylanguage?hl=fr

Hann
  • 727
  • 3
  • 11
  • 22
0

If you have the same names in the same order on both Sheets, you can do in A1:

={Sheet2!A:A}

in B1:

=arrayformula(if(Sheet2!B:B<Sheet3!B:B;Sheet2!B:B;Sheet3!B:B))

and in C2:

=arrayformula(vlookup(sign(Sheet2!B2:B-Sheet3!B2:B);{-1,"track1";0,"both";1,"track2"};2;false))

or (if your locale uses , as decimal separator):

=arrayformula(vlookup(sign(Sheet2!B2:B-Sheet3!B2:B);{-1\"track1";0\"both";1\"track2"};2;false))
mik
  • 3,575
  • 3
  • 20
  • 29