PDA

View Full Version : Need code string for copying multiple cells from multiple pages across worksheets



Bells
06-21-2017, 02:03 PM
I have 6 worksheets (cc2017; ab2017; bh2017; etc), each that have 12 tabs at the bottom (6.25; 7.1; 7.14; KPIs; etc), and a 'master' worksheet where I want to have it grab a specific cell, from a specific tab, from a specific worksheet, and copy that data to the master?

I found this bit of code, but it gives me an error message of: formula parse error

=DG2017!KPIs!B26

I know that I have it wrong, but I am not sure what is wrong with it?
I would be happy to be able to have the code to grab a single cell, bc I can do everything else after building a datasheet that has all of the data I want from each sheet.

I have spent 2 hours reading through things and can't find the string of code I need, so I figured it is time to simply ask for help:)

Bells
06-21-2017, 02:21 PM
I have also tried this:
IMPORTRANGE("https://docs.google.com/spreadsheets/d/abcd123abcd123", "sheet1!A1:C10")
IMPORTRANGE(A2,"B2")
SyntaxIMPORTRANGE(spreadsheet_key, range_string)


spreadsheet_key - The URL of the spreadsheet from where data will be imported.


The value for spreadsheet_key must either be enclosed in quotation marks or be a reference to a cell containing the URL of a spreadsheet.


range_string - A string, of the format "[sheet_name!]range" (e.g. "Sheet1!A2:B6" or "A2:B6") specifying the range to import.


The sheet_name component of range_string is optional; by default IMPORTRANGE will import from the given range of the first sheet.

The value for range_string must either be enclosed in quotation marks or be a reference to a cell containing the appropriate text.

Using: IMPORTRANGE(B1, "KPIs!B26")
Where B1 contains the URL of the spreadsheet. Also I tried putting the URL directly into the code.

Bells
06-21-2017, 02:27 PM
Oh jeez... okay I think the issue was a totally noob move...
=IMPORTRANGE(B1, "KPIs!B26")
Both of the sites I looked at for the code did NOT specify the = at the front. *facepalm* I tried that and now it is working.