1

The Google Sheets formula below is located in column A1 of my Google Sheet. This formula creates data in column A & B. I need to transpose this data into 1 row

=GOOGLEFINANCE(A2,"price",TODAY()-30,TODAY())

=TRANSPOSE(GOOGLEFINANCE(A2,"price",TODAY()-30,TODAY()))

The transpose formula successfully transposes the data in the 2 columns to 2 rows, as it should. My question is, will there be a way to transpose two columns of data into 1 single row - I have searched around for a solution for Google Sheets without any Luck.

player0
  • 124,011
  • 12
  • 67
  • 124
westman2222
  • 663
  • 1
  • 12
  • 30

1 Answers1

0

you can use famous "double query smush" like:

=QUERY(TRANSPOSE(QUERY(TRANSPOSE(GOOGLEFINANCE(A2, "price", TODAY()-30, TODAY())),,999^99)),,999^99)
player0
  • 124,011
  • 12
  • 67
  • 124
  • great, any way to strip out the data of say column B and just transpose column a ? – westman2222 Jun 23 '19 at 14:15
  • sure: `=QUERY(TRANSPOSE(QUERY(TRANSPOSE(QUERY(GOOGLEFINANCE(A2, "price", TODAY()-30, TODAY()), "select Col1", 0)),,999^99)),,999^99)` – player0 Jun 23 '19 at 14:17
  • this worked like a charm, thank you very much - last thing though, it is putting all of the data into one cell.... is there a way the formula can put each piece of transposed data into its own cell? – westman2222 Jun 23 '19 at 14:22
  • try: `=SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(QUERY(GOOGLEFINANCE(A2, "price", TODAY()-30, TODAY()), "select Col1", 0)),,999^99)),,999^99), " ")` – player0 Jun 23 '19 at 14:30
  • 1
    seriously amazing stuff, thanks again for your help this answered my question exactly! :) – westman2222 Jun 23 '19 at 14:32