I got a problem with one fromula.
Two sheets:
1st Sheet
2nd Sheet
Look at formula on 2nd sheet B2
=IFERROR(INDEX(Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!A:A"),
MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!B:B"), 0)), "Not ordered")
It is matching my status from 1st spreadsheet but only from B column. My question is how to add C column as well (add another match criteria). I want to have B and C together. Is it possible?
Thanks!
I've tried something like this but it is not working :
=INDEX("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!A:A"), MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!B:B"),
MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!C:C"), 0))
=IFERROR(INDEX(Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!A:A"),MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!B:B"), 0)), IFERROR(INDEX(Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!A:A"), MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!C:C"), 0)), "Not ordered"))
Try this! I joined a second exact formula as yours in the second parameter of the first IFERROR
It'd probably be easier to just do a an OR statement. So something like this.
=If(Or(isnumber(firstcolumnLookupFormula),
isnumber(SecondColumnLookupFormula)),"Ordered","Not Ordered").
You could do as many as needed then.
Related
my question is simple enough. It involves, using XLOOKUP formula. So, following is the issue, I'm facing.
I have master data sheet, which I'm using for the lookup reference.
In sheet XLOOKUP test, I'm looking up the Task Completion Status for the search keys Sl No. in cell C3 and Date in cell C4.
I've applied the formula-
XLOOKUP($C$3&$C$4, 'Master Data'!$A$2:$A$9&'Master Data'!$C$2:$C$9, 'Master Data'!$D$2:$D$9, , 0, 1)
But, it pops out an #N/A error message with Array arguments to XLOOKUP are of different size..
So what am I doing wrong ?
Here's a link to my sheet, if needed.
To combine columns into a compound key, you need to wrap the formula in arrayformula(), like this:
=arrayformula( xlookup(C3 & C4, 'Master Data'!A2:A9 & 'Master Data'!C2:C9, 'Master Data'!D2:D9) )
Alternatively, use filter():
=filter('Master Data'!D2:D9, C3 = 'Master Data'!A2:A9, C4 = 'Master Data'!C2:C9)
See your sample spreadsheet.
in this example table, I want to get the first "failed" or "passed" from result 1, 2, and 3 column. I already made a formula to get the first mentioned value using:
=IF(C2=C2,CELL("address",INDEX(D2:F2,MATCH(C2,D2:F2,0))),)
which works fine (the column result is from that formula)
But when I'm trying to use ArrayFormula on the formula, it only shows the first row value only. my ArrayFormula is like this:
=ArrayFormula(IF(C2:C4=C2:C4,CELL("address",INDEX(D2:F2,MATCH(C2:C4,D2:F2,0))),))
i think its because the INDEX and MATCH doesn't update as it goes down, any idea how to fix this?
Sheets link: https://docs.google.com/spreadsheets/d/1oFTZHGd9PKpfZ9QXWvTshorEOGFxmD1cpeeQ9bIOYh8/edit?usp=sharing
You could use a query to get the minimum column matching the value in column C for each row in D to F:
=ArrayFormula(lambda(a,address(index(a,,1),index(a,,2)))
(query(split(flatten(if(C2:C="",,if(D2:F=C2:C,row(C2:C)&"|"&column(D2:F),))),"|"),"select Col1,min(Col2) where Col2 is not null group by Col1 label min(Col2) ''")))
Or alternatively you can use a formula similar to your original one with Byrow:
=ArrayFormula(if(C2:C="",,byrow(C2:F,lambda(r,CELL("address",INDEX(r,1+MATCH(index(r,,1),index(r,,2):index(r,,columns(r),0))))))))
hope you have a good day/evening.
Due to I always seems to use importrange function to import multiple sheets. I want to have a quicker way to replace the date (highlighted in red as per the screenshot) with the date referenced in Col A. This is my Google Sheet under the tab name "TextJoin" Google Sheets Link
try:
=INDEX({""; "={"&TEXTJOIN("; ", 1,
"IMPORTRANGE(""13DWtP4L7swqBgK6BGLeA-o_FfyD-D8-Ru30cOPf0I10"", """&
FILTER(TO_TEXT(A2:A)&"!A2:C"")", A2:A<>""))&"}"})
but you may need to wrap it into query and remove empty rows perhaps like:
=INDEX({""; "=QUERY({"&TEXTJOIN("; ", 1,
"IMPORTRANGE(""13DWtP4L7swqBgK6BGLeA-o_FfyD-D8-Ru30cOPf0I10"", """&
FILTER(TO_TEXT(A2:A)&"!A2:C"")", A2:A<>""))&"}, ""where Col1 is not null"", )"})
Try
=importrange("_____","'" & text(A2,"M/d/yy") &"'!A2:C")
I'm trying to count instances of letters (like letters C through Z, excluding RR) within the same column if they are listed next to a name. Here's my sample Google Sheet that you can edit.
I'm trying to insert the formula in cell F3 that is highlighted yellow. So far I have...
=arrayformula(SUM(COUNTIFS(A2:A,{"C","D","E","F","G"},C2:C,E3:E)))
It seems like what I have should work, but it's giving me a #VALUE error, saying, "ARRAY arguments to COUNTIFS are of different size".
It seems like REGEXMATCH could be used inside the COUNTIF formula to make it easier to restrict the search to the range of letters I need, but not sure how to construct the formula.
Thanks for your help!
UPDATE
This formula below works but only for column A. I actually need to specify a different range of letters to be counted in column B and totaled in column K.
=QUERY(A2:C,"select C,count(A) where A matches 'C|D|E|F|G|H|I|J|K' group by C label count(A)''", 0)
Seems like this post almost answers it.
Current progress:
={QUERY(A2:C,"select C,count(A) where A matches 'C|D|E|F|G|H|I|J|K' and A is not null group by C label count(A)''", 0),QUERY(A2:C,"select count(B) where B matches 'F|G|H|I|J|K' and B is not null group by C label count(B)''", 0)}
As we have discussed / tested on your sample sheet. This should work as close as possible to the data that you would want to filter/display.
A 2-formula solution was found to work as well. Answer is in the same spreadsheet linked above in Sheet2. It should prevent the first formula from not working should someone need a different one.
J2 - =QUERY(A2:C,"select C,count(A) where A matches 'C|D|E|F|G|H|I|J|K' group by C label count(A)''", 0)
L2 - =ArrayFormula(IFNA(vlookup(J2:J,QUERY(A2:C,"select C,count(B) where B matches 'F|G|H|I|J|K' group by C label count(B)''", 0),2,0)))
This formula should work for you if you paste it in cells F3 to F7.
I currently have cells P1 to P26 (you'd probably want to hide this column) occupied with the letters of the alphabet in order, making it so that you can select P3:P26 (C-Z) to put into your first condition for your COUNTIFS.
=arrayformula(SUM(COUNTIFS(A2:A, $P$3:$P$26,C2:C,E3)))
You'll have to implement these formulas in the other places that you want them too, but it shouldn't be hard to change this formula to work in the other places as well.
I'm trying to import some specific cells from one worksheet to another, and I want to do so in a repeating, intermittent way.
For instance, if A51 is the first cell to be imported, I want to import A51 and all "reoccuring next fifth cells" in the same row (A56, then A61, then A66 and so on).
I figured I'd only need to use ArrayFormula, ImportRange and Offset, but I couldn't be more wrong. In my inexperienced mind, the formula would look something like this:
=ARRAYFORMULA(OFFSET(IMPORTRANGE("url";"Page1!A51:51");0;5))
... but it obviously doesn't work. I keep falling into the same problem no matter how much I tweek it, "the argument must be an interval". I've stumbled across similar problems here in StackOverflow, but none of them were quite the same issue; I tried their solutions and they also didn't work.
e.g. Exemple
So now I resort to you, great SO community. Could anyone explain to me why am I failing so miserably in a (most probably) simple task? I appreciate any help!
Thanks!
First see if you can just omit blank values and get the result you want. In the Input spreadsheet, choose Insert > New sheet and put this formula in cell E4 of the new sheet:
=query( transpose('Página1'!B4:4); "where Col1 is not null"; 0 )
You can then do the same in the Output spreadsheet with these formulas:
=query( transpose(importrange("1el8PStX7NxRLbL-LC1afPTY3zAv2QqaQotRR18o0EjM"; "Página1!B4:4")); "where Col1 is not null"; 0 )
=query( transpose(importrange("1el8PStX7NxRLbL-LC1afPTY3zAv2QqaQotRR18o0EjM"; "Página1!B6:6")); "where Col1 is not null"; 0 )
If that is not what you needed, please show more realistic-looking sample data in the Input spreadsheet and the hand-entered results you would like to get from that data in the Output sheet. Do not show ColB;Row4 but the actual results you would like to get.