I'm trying this function on Google spreadsheet without success in order to gather in a sheet a value after a VLOOKUP:
=importrange("otherurl";cell("address";vlookup(value("201608"),"All_nodevice!$A$16:$C$1000",2,false)))
I get a general error.
Does IMPORTRANGE support this kind of functionality?
What I need to do is to extract data from the cell of another sheet that has the value 201608 on its left. Since IMORTRANGE wants a cell pointer such as $A$12, I thought to do these steps:
search with a lookup the value.
convert the result in a cell pointer.
I found the right way. May be it could be useful for someone else.
=VLOOKUP(201608;IMPORTRANGE("sheet url"; "All_nodevice!$A$16:$C$1000"); 2; 0)
or
=query(IMPORTRANGE("sheet url";"All_nodevice!$A$16:$C$1000");"select Col2 where Col1=201608 limit 1")
Just the ID worked for me as well instead of the URL. I had my numbers as text, so kept getting an error at first. Silly mistake, but what you are looking up probably has to be the same kind of thing (text vs numbers).
=vlookup(Q6,IMPORTRANGE("1m9IN4_NH717VATXWLnPgTvrKxnRHwtH8z-f38r9F3zY","Props!A1:Bb400"),38,false)
Related
I have a count using a formula that needs to be stretched (the formula is in cell F9
) https://docs.google.com/spreadsheets/d/1sZM1aAuqkHNONJWagiu3aTw6_vfw515gbiKwhKuQAD4/edit#gid=1464536028
=IF(ISBLANK(E9);;IF(O9=TRUE;INDEX('Тех Лист'!$F$2:$M$2;MATCH(TRUE;Q9:X9;0));IF(P9=TRUE;INDEX('Тех Лист'!$F$3:$M$3;MATCH(TRUE;Q9:X9;0));"Ошибка!")))
I tried to remake it under Arrayformula, but nothing came of it ... later I got the idea to do it through query, but when I add query to the array, the data I need disappears
=INDEX(split(FLATTEN(TRANSPOSE({'Стадник'!$D9:D&"x"&'Стадник'!$Q8:$X8&"x"&'Стадник'!Q9:X&"x"&'Тех Лист'!$F$2:$M$2&"x"&'Тех Лист'!$F$3:$M$3}));"x"))
Please tell me how I can compare the headers, and if the list is TRUE, take the sum from the table
In G9 I entered
=ArrayFormula(if(len(E9:E); vlookup(trim(transpose(query(transpose(if(Q9:X; Q8:Y8;));;50000)))&""; transpose('Тех Лист'!E1:M3)&""; if(O9:O; 2; if(P9:P; 3;));0)+0;))
Note that this solution requires that only one checkbox can be ticked in the range X9:X.
See if that helps ?
In my other question, I can get the sub-range of a range by using INDIRECT and CELL: Calculate PRODUCT of a sub-range in a Google Sheets range
However, If I use the formula in another sheet, it will show #REF!:
Error
Function INDIRECT parameter 1 value is 'Sheet1!$I$2:Sheet1!$I$17'. It is not a valid cell/range reference.
I know that the format should be Sheet1!$I$2:$I$17 but I wonder how can I do that?
Example sheet: https://docs.google.com/spreadsheets/d/1byIjDzHZE6s5N1PcN9yvSeC51bm9NVVC1tc1gjQQLHA/edit#gid=462032657
It could be better if I can use named range for this.
Where you get this Sheet1!$I$17 you might enclose it in:
REGEXEXTRACT(..., "[^!]+$")
This will cut off sheet's name from the cell name.
But you've got a nice solution in that question where you can use OFFSET and forget about string manipulations for INDIRECT. And it will still work when you copy it to different sheet.
Here's a tidy little solution that i've left for you on Sheet1 in cell R9:
=ARRAYFORMULA(PRODUCT(B2:N21^((A2:A21<=R3)*(B1:N1=R4))))
Cheers!
I'm trying to create a data array from multiple cells in one cell and fail:
My data is placed in cells from A3 to A3000. I try to paste into A1 the formula like =A3&"|"&A4&"|"&A...&"|"&A3000. The length of this formula is 29.345 characters - fewer than the limit of 50.000 characters à cell.
But just after pasting of formula into A1 I get an error from Google Sheets "Can't load the file. Try later or send bug report".
The only thing I suppose is, that there are some different limits for the length of formulas, then they are for the strings... Or does somebody know, what happens here and how could I overcome this error?
Is there any formula length limitation
yes there is but it can be surpassed - https://stackoverflow.com/a/55070275/5632629
so far my longest formula had 422 379 characters
are you sure you need to do it like that (unclear from your question) instead of just:
=TEXTJOIN("|", 1, A3:A3000)
or maybe even like (it really depends on what you want to do next):
=QUERY(A3:A3000,,999^99)
or perhaps:
=ARRAYFORMULA(A3:A3000&"|")
Based on this previous post, I think the limit for formulas is the same as for content.
I would suggest trying to solve this with a custom formula in Apps Script.
function concatValues(range) {
return range.join("|")
}
Then run your custom formula with =concatValues(A3:A3000).
Here's the straightforward version of my question:
I want to change the following formula to an array formula...
Original formula (from cell J2):
=if(F4="VM:",G4,J1)
My attempt at converting to an array formula (in cell K1):
=arrayformula(if(row(A:A)=1,G3,if(F:F = "VM:",G:G,indirect("K"&row(A:A)-1))))
This works on rows where F = "VM:", but returns a #REF error on other rows. Function INDIRECT parameter 1 value is 'K0'. It is not a valid cell/range reference.
Thoughts on how to fix this?
The more complex version of my question. i.e. Why am I trying to do this?...
I have a weird spreadsheet with data that should really be in a Wiki.
I want to create filter views for each person so they can easily filter on only their own vendors. The original formula will work, but as more vendors are added, I'd like for the formula to automatically work for those rows as well.
If there's a better way to do this, I'm listening.
I don't exactly understand your needs, but If you want to autopopulate your formula, then you only need this code in desire column in row 4 (you can change this to any other - this will autofill down from this point):
=ArrayFormula(if(F4:F="VM:",G4:G,J1:J))
Is this what you are trying to get?
After clarification:
You need this code in J2 only:
=ArrayFormula(VLOOKUP(ROW(J2:J),
QUERY({F:G,ROW(G:G)},"select Col3,Col2 where Col1='VM:'",1)
,2,1)
)
Works for you?
maybe you just need to hide errors?
=IFERROR(ARRAYFORMULA(IF(ROW(A:A)=1,G3,IF(F:F = "VM:",G:G,INDIRECT("K"&ROW(A:A)-1)))),)
I have two columns I do the sumproduct operation on them this way:
=SUMPRODUCT(I37:I61, **D37:D61**)
and it works perfectly well - I put the result in the cell I8
but when I copy this function to cell J8
it transfers to:
=SUMPRODUCT(J37:J61, **E37:E61**)
I want TO FIX one array, so my function would look like
=SUMPRODUCT(J37:J61, D37:D61)
I hope it's clear what do I want to achieve :)
are there any ways to do so?
Not sure about google spreadsheet, but in microsoft Excel you would need to use below formula for ur use. I think same will work in Google Spreadsheet too.
=SUMPRODUCT(I37:I61, $D37:$D61)
Notice '$' which says not to translate D when you do copy-paste.
I would used named ranges to avoid any confusion. Here are the steps
1) Select the range D37:D61
2) give the name a range by tying in a name to the left hand side of the fx near where you insert the formula
3) let's call that range DATA1
4) then use the formula =SUMPRODUCT(I37:I61, DATA1)
5) when you copy this formula over to next cells it should show as =SUMPRODUCT(J37:J61, DATA1)
Let me know how you get on.