I was using this formula to pull data from a sheet in the same document and it was working fine:
=IF(REGEXMATCH(IMPORTRANGE("1LO97xUQXHScmqzJOOKwZHx-n_FuwhD6GgkoFUciHpMk", "AMB-44-L2-csv!L7"),"\*$|RECYCLE.BIN|System Volume Information|^$"),,REGEXREPLACE(IMPORTRANGE("1LO97xUQXHScmqzJOOKwZHx-n_FuwhD6GgkoFUciHpMk", "AMB-44-L2-csv!L7"),".*\\"," └─ "))
Then I decided to pull the same data from a copy of that same sheet, but in another document and now I'm stuck on this:
=IF(REGEXMATCH(IMPORTRANGE("1LO97xUQXHScmqzJOOKwZHx-n_FuwhD6GgkoFUciHpMk", ADDRESS(row()-2,column()-1,,,"AMB-44-L2-csv")),"\*$|RECYCLE.BIN|System Volume Information|^$"),,REGEXREPLACE(IMPORTRANGE("1LO97xUQXHScmqzJOOKwZHx-n_FuwhD6GgkoFUciHpMk", ADDRESS(row()-2,column()-1,,,"AMB-44-L2-csv")),".*\\"," └─ "))
Any idea how to make it work?
use:
=IF(REGEXMATCH(IMPORTRANGE("1LO97xUQXHScmqzJOOKwZHx-n_FuwhD6GgkoFUciHpMk",
ADDRESS(ROW()-2,COLUMN()-1,4,1,"AMB-44-L2-csv")),"\*$|RECYCLE.BIN|System Volume Information|^$"),,
REGEXREPLACE(IMPORTRANGE("1LO97xUQXHScmqzJOOKwZHx-n_FuwhD6GgkoFUciHpMk",
ADDRESS(ROW()-2,COLUMN()-1,4,1,"AMB-44-L2-csv")),".*\\"," └─ "))
note: formula cant be used in column A and row 1 & 2
Related
I am trying to create a production order-bill of material master sheet. The issue I am having is when I use =filter to get my bom data I can only do one line item without a #ref error. I am hoping to find a way to =filter then add rows(push down the data) so data does not get overwritten.
This is working when I am only filtering for one line item
The issue comes when I drag the formula down to get the BOM info for ROW 2.
Error when dragging the formula through the sheet
I have highlighted the line item and filter results I am looking for. If anyone has a solution to add X amount of rows based on the filter results that would be great. I am currently at a loss. I have tried for weeks.
https://docs.google.com/spreadsheets/d/1Ubs9nthgk9h-DKxXMVhAjPZF8ot1F98nCcLccLbTbyE/edit?usp=sharing
you could do it like this and drag down:
=ARRAYFORMULA(SUBSTITUTE(SUBSTITUTE(QUERY(FILTER(SUBSTITUTE(BomMaster!$1:$17000, " ", "♦"),
BomMaster!A:A=B2&" "&C2&" "&D2),, 9^9), " ", CHAR(10)), "♦", " "))
This question already exists:
Is there a custom function or script that returns gid of a specific sheet in Google Sheets?
Closed 1 year ago.
Important: I asked this question before and it was merged into another question where the solution is using a script. Such a solution, with a script, is not helpful to me, so please only offer a solution with formulas, thanks.
I have a main sheet with a list of the names of the other sheets in the workbook. I want to create a glossary in the main sheet linking to cell A1 in each of the other sheets (a simple Hyperlink).
In Col A - list of sheet names (e.g. Jan, Feb)
In Col B - I want the hyperlinks (e.g. a link to Jan!A1, a link to Feb!A1)
What I can do, is use INDIRECT and CONCATENATE to bring the respective value of the cells (I've added it in Col C in the example below), but I can't find how to create the links.
Here's an example:
https://docs.google.com/spreadsheets/d/1C1LghRPcutYBwgZZaitJQ1PVrgggr5XdvG6V7L32eE0/edit#gid=0
and here we go again... this is your previous question: stackoverflow.com/questions/70054228 (for reference)
what you don't need is:
INDIRECT formula
CONCATENATE formula
because these are not capable of solving your issue
to solve your question:
Hyperlinking to sheets without using a script
you need two things:
HYPERLINK formula
#gid= number
GID number can be acquired from the URL of every sheet tab. for creating a list of all GID numbers you need a script. since the script is not an option for you (as for your request), your only option is to create a list of GIDs manually - eg. going into each tab of your spreadsheet and extracting GID numbers from the URL
note: each spreadsheet has unique GID numbers for each of the sheets. only first sheet on every spreadsheet has GID value set to 0 - #gid=0
after you will have all the necessary GIDs (let's say in a column) you can go for the next step and use HYPERLINK formula:
instead of the URL as the first argument, we use GID to create jump links:
=HYPERLINK("#gid=1220119768"; "Sheet 2")
of course, this is the same as using full URL:
=HYPERLINK("https://docs.google.com/spreadsheets/d/1yaRwbLGmDeynYktvxmLJcCBZrAvqgJA-_nYTlVf92Tc/edit#gid=1062970060"; "Sheet 2")
the only difference is in formula length
for multiple hyperlinks we can use arrayformula:
=ARRAYFORMULA(HYPERLINK("#gid="&A2:A5; B2:B5))
where:
A B
1
2 1062970060 Sheet 2
3 2118975038 Sheet 3
4 273293449 Feb
5 1564587416 some other label
6
if you want your hyperlinks to lead for example to F8 you can add &range=F8 so:
=ARRAYFORMULA(HYPERLINK("#gid=" & A2:A5 & "&range=F8"; B2:B5))
also, if it wasn't clear... labels are not mandatory. you can skip them and have just:
=HYPERLINK("#gid=1220119768")
and also keep in mind that the 2nd argument of HYPERLINK can take even formula:
=HYPERLINK("#gid=1220119768"; INDIRECT(A2&"!A1"))
and to save your time... INDIRECT is not supported under ARRAYFORMULA. the only workaround for that would be to place multiple INDIRECTs into array {}:
=ARRAYFORMULA(HYPERLINK("#gid="&
{"1220119768"; "2118975038"; "273293449"; "1564587416"};
{INDIRECT(A2&"!A1"); INDIRECT(A3&"!A1"); INDIRECT(A4&"!A1"); INDIRECT(A5&"!A1")}))
I'm trying to find a way to (I think) get a single cell out as part of a query that also returns columns, I don't know if it's even possible. Brief explanation - every quarter we get v. detailed audit reports in via google sheets in 6 spreadsheets of between 20-45 case files each, each with their own separate tab/sheet within that. I've managed to use query to pull out and collate the major issues from all of them in a new sheet for analysis using
=QUERY({IMPORTRANGE(A3,"Case File 1!F18:M");IMPORTRANGE(A3,"Case File 2!F18:M");IMPORTRANGE(A3,"Case File 3!F18:M")},"Select Col1,Col4,Col7 where Col4 contains 'concern'")
This gives me a neat list of all the concern point narratives against the specific criteria they come under, to do funky things with, but what I haven't managed to do is actually get anything that says 'these concern points are from Case File 1' or similar. There could be 0, 1, 5 concern points, so I never know how many rows it's going to return. Is there an easy way to go 'select this one cell (with the organisation name on) as well as the concern bits and stick the name next to all of them? I doubt it, but any ideas welcome, I don't want to have to run the queries separately and collate them later. Can't attach a copy of the sheets unfortunately, it's all confidential info. I've tried adding Col3 to the mix, which is the one with the name on (and some other extraneous info that looks messy, but ah well) but this only returns the name bit for the first sheet on the top - I haven't got the hang of headers so that might be why?
Cheers, sorry for the length, first question and I'm not sure what you need to know.
Meg
Try:
=arrayformula(
query({
query({iferror(IMPORTRANGE(A3,"Case File 1!F18:F")/0,"Case File 1"),IMPORTRANGE(A3,"Case File 1!F18:M")},"where Col5 contains 'concern'",0);
query({iferror(IMPORTRANGE(A3,"Case File 1!F18:F")/0,"Case File 2"),IMPORTRANGE(A3,"Case File 2!F18:M")},"where Col5 contains 'concern'",0);
query({iferror(IMPORTRANGE(A3,"Case File 1!F18:F")/0,"Case File 3"),IMPORTRANGE(A3,"Case File 3!F18:M")},"where Col5 contains 'concern'",0)
},"select Col1,Col2,Col5,Col8",0)
)
This option places the text column at the end (and just one query):
=arrayformula(
query({
IMPORTRANGE(A3,"Case File 1!F18:M"),iferror(IMPORTRANGE(A3,"Case File 1!F18:F")/0,"Case File 1");
IMPORTRANGE(A3,"Case File 2!F18:M"),iferror(IMPORTRANGE(A3,"Case File 2!F18:F")/0,"Case File 2");
IMPORTRANGE(A3,"Case File 3!F18:M"),iferror(IMPORTRANGE(A3,"Case File 3!F18:F")/0,"Case File 3")
},"select Col1,Col4,Col7,Col9 where Col4 contains 'concern' ",0))
I would like to access data from one Google Spreadsheet on another using strictly formulas.
Currently, I am able to import data using the =IMPORTRANGE(), but need to take this a couple steps further.
The data that I have looks like this:
Spreadsheet 1: Each sheet is for a different day, and has people and the number of fruits they pick from a farm (this is example data). However, the people are not necessarily organized exactly the same way on each day.
Spreadsheet 2: Each sheet is organized by person. Row A has the day (which will be used to lookup from the other spreadsheet), and a function exists in the second spreadsheet to find the persons name (=sheetName()).
What I have so far is [for Spreadsheet 2]:
=IMPORTRANGE(Master!A1, A2 & "!B2")
Where Master!A1 refers to the link of the other spreadsheet, A2 refers to the Day1. However, the part I am looking to replace is the 2 in the B2 to find the row of the person's name in the sheet Day1 from the first spreadsheet.
I feel like I have to do something like this:
=IMPORTRANGE(Master!A1, A2 & "!B" & MATCH(IMPORTRANGE(Master!A1,A2 & "!B1:B100"),sheetName(),0))
, but this gives me the error that it "Did not find value 'Apples' in match evaluation"
Here is the example folder with the two spreadsheets.
https://drive.google.com/drive/folders/0B8lJN2vmKeTBV1JYR2ZoZlVfQUU
All help is appreciated!
I can't find the sample data that you attached but here's what you need to do.
1. Link of the other spreadsheet
2. Name of the sheet to import from
3. =importrange(link,sheet!A:D) [for the sake of an example]
4. =query(importrange(link, sheet!A:D),"select * where Col1 = 'Person's_Name' ",1)
Share a sheet if you are not able to put it together on your data. Cheers!!
I am not sure the best way to ask this so I will give an example of what I am trying to do.
I have one tab in google sheets with several rows like so:
option 1
option 2
option 3
In a second sheet I want to create a formula that I can copy down that will produce something like this
prefix1_option1
prefix2_option1
prefix3_option1
prefix1_option2
prefix2_option2
prefix3_option2
prefix1_option3
prefix2_option3
prefix3_option3
Using formula like
"prefix1_"&'Sheet'!A1
"prefix2_"&'Sheet'!A1
"prefix3_"&'Sheet'!A1
works for the first one but does not copy properly.
Try:
=ArrayFormula(transpose(split(rept(concatenate({"prefix1_";"prefix2_";"prefix3_"}&char(9)),3),char(9)))&transpose(split(concatenate(rept(Sheet1!A:A&char(9),3)),char(9))) )
or alternatively, write in B1:B3 of sheet 1: "prefix1", "prefix2", "prefix3" (without the quotes) and then do:
=ArrayFormula(transpose(split(rept(concatenate(Sheet1!B:B&char(9)),3),char(9)))&transpose(split(concatenate(rept(Sheet1!A:A&char(9),3)),char(9))) )