Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Spreadsheet, copy column in sheet to column in another sheet

I'm trying to figure out how to have the entire contents of a column in one sheet show in another sheet.

For example I have column D in sheet2 that I want to show in column A of sheet1. Something like:

=ARRAYFORMULA(Sheet2!D) 

But that gives me a syntax error.

like image 284
JuggaloBrotha Avatar asked May 31 '13 00:05

JuggaloBrotha


People also ask

How do I copy a column in Google Sheets to another sheet?

Select the cells you want to copy. Press Ctrl+C (Windows) or Command+C (Mac) on your keyboard to copy the cells. Select the cell or cells where you want to paste the cells. The copied cells will now have a box around them.

How do I copy and paste columns in Google Sheets?

To copy and paste, you can use keyboard shortcuts: PC: Ctrl + c for Copy, Ctrl + x for Cut, and Ctrl + v for Paste. Mac: ⌘ + c for Copy, ⌘ + x for Cut, and ⌘ + v for Paste.


2 Answers

Use:

=ArrayFormula('Sheet2'!D:D)

like image 145
AdamL Avatar answered Oct 01 '22 18:10

AdamL


If you want to share columns across separate files, you can use:

=importrange("17s-yYzX8GYvyA2PorY2PLaZ5OpFi14wU0ugAyTIrL24","Sheet1!G:J") 

where the first string is the key of the sheet file that you want to import from. You can copy that directly from the URL e.g. https://docs.google.com/spreadsheets/d/17s-yYzX8GYvyA2PorY2PLaZ5OpFi14wU0ugAyTIrL24/edit#gid=0. The second string is the name of the sheet in the source file and in the example G:J means import columns G through J.

like image 40
David Clarke Avatar answered Oct 01 '22 18:10

David Clarke