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")
Related
I got this "table" (page raids) and want to do function formating for highlight duplicates (yellow).
Google Sheet
In this case there is match in 2 strings (dark blue):
Name1
Gunslinger
I already try functions VLOOKUP, Match, Filter, countifs and Quary (dont know how it works...) with Index function, but nothing seems work as I want ...
VLOOKUP and Match only gives first value.
Filter doesnt work on this strucker or I dont know how to use it in this case (I know how it works in normal table)
Can someone tell me what function conbination to use that can be put in Function formating ?
Formating for each row:
Example: =IF(B3>0;IF(B4<1490;TRUE;FALSE);FALSE)
ECT.
After some searching and testing, I came up with this:
=ArrayFormula(SUM(IFERROR(FIND(B2&B3;MID(CONCATENATE((TRANSPOSE($B$2:$I$33)));SEQUENCE(LEN(CONCATENATE((TRANSPOSE($B$2:$I$33))));1;1;1);len(B2&B3)))=1)*1))>1
Still need to make the functions more tidy (picture 2 and 3).
See if this is what you are looking for?
Conditional formatting with Custom formula in Range: A2:H:
=LAMBDA(NAME,OR(A1=NAME,A2=NAME,A3=NAME))("Gunslinger")
or do you means you want to highlight only duplicates?
If that is the case, you may try this formula:
=LAMBDA(DATARANGE,
LAMBDA(FLAT,
{{"Team","Duplicate"};{UNIQUE(FLAT),BYROW(UNIQUE(FLAT),LAMBDA(NAME,COUNTIF(FLAT,NAME)>1))}}
)(
QUERY(FLATTEN(
BYCOL(DATARANGE,LAMBDA(C,
BYROW(C,LAMBDA(R,
IF((ROW(R)+1)/4=INT((ROW(R)+1)/4),R,"")
))
))
),"SELECT Col1 WHERE Col1 IS NOT NULL",0)
)
)(A2:H)
This formula returns an array of unique Names with checking if there are Duplicates in the given datarange.
Combine this with the 1st formula should be able to highlight repeated data sets from your table.
Solution for 2 criteria matching:
The formula inside the image form the table of unique match results,
use that result with OR(), XLOOKUP(), OFFSET(), INDEX() as below for the final formula to put into the custom formula in conditional formatting.
=LAMBDA(RESULT,
LAMBDA(NAME,DUP,KEY,
LAMBDA(KEY_M2,KEY_M1,KEY_P1,
OR(
XLOOKUP(KEY_M2&"&&"&KEY_M1,NAME,DUP,FALSE),
XLOOKUP(KEY_M1&"&&"&KEY,NAME,DUP,FALSE),
XLOOKUP(KEY&"&&"&KEY_P1,NAME,DUP,FALSE)
)
)(IFERROR(OFFSET(KEY,-2,0),""),IFERROR(OFFSET(KEY,-1,0),""),IFERROR(OFFSET(KEY,1,0),""))
)(INDEX(RESULT,,1),INDEX(RESULT,,2),A2)
)(
LAMBDA(DATARANGE,
LAMBDA(FLATCLASS,
{{"Name","Duplicate"};{UNIQUE(FLATCLASS),BYROW(UNIQUE(FLATCLASS),LAMBDA(NAME,COUNTIF(FLATCLASS,NAME)>1))}}
)(
QUERY(FLATTEN(
BYCOL(DATARANGE,LAMBDA(C,
BYROW(C,LAMBDA(R,
IF((ROW(R)+1)/4=INT((ROW(R)+1)/4),IF(R="","",INDEX(C,ROW(R)-2)&"&&"&R),"")
))
))
),"SELECT Col1 WHERE Col1 IS NOT NULL",0)
)
)($A$2:$H)
)
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.
We have hit the dreaded 5 million rows limit which is so small for any semi-serious data.
We have an important ArrayFormula piece in one of our worksheets (tab) currently that summarizes the data from another worksheet in the same file where time series data is kept with dates. This is our current function:
=ArrayFormula(SUMIFS(DataSheet!$B:$B,
MONTH(DataSheet!$A:$A), 1,
YEAR(DataSheet!$A:$A), 2020)
)
Explanation: This basically summed all of column B in the DataSheet tab for the month of Jan 2020 based on date found in column A of that sheet.
However, this worksheet of data that is now running close to that row limit. We can move it to another Google Sheets file, and refer to the same data via IMPORTRANGE.
The question then is how to refer to that data instead of the DataSheet!$A:$A in the above old formula? Will this reference be replaced by the entire IMPORTRANGE function?
Old:
=ArrayFormula(SUMIFS(DataSheet!$B:$B,
MONTH(DataSheet!$A:$A), 1,
YEAR(DataSheet!$A:$A), 2020)
)
New:
=ArrayFormula(SUMIFS(IMPORTRANGE(filename, rows)!$B:$B,
MONTH(IMPORTRANGE(filename, rows)!$A:$A, 1,
YEAR(IMPORTRANGE(filename, rows)!$A:$A, 2020)
)
This does not work of course, because we cannot have the exclamation ! followed by the column in an importrange. Any other thoughts?
Try this in cell A1 on a fresh, brand new tab somewhere:
=ARRAYFORMULA(QUERY(1*TEXT(IMPORTRANGE("[spreadsheet key]","Sheet1!A:B"),{"mmmyyyy","0.00"}),"select Col1,SUM(Col2) where Col2<>0 group by Col1 order by Col1")
The "spreadsheet key" is the combination of letters and numbers after the "/d/" and before the "/edit..." in the URL of your source sheet.
Obviously, you'd also replace "Sheet1!A:B" with whatever the real tab/column reference is.
Then, select all of Column A and from the Menu choose Format>Number>More Formats>Custom Number Formatting, Then this in the dialog box:
mmmm yyyy
You want to IMPORTRANGE from two different sheets in a different spreadsheet.
While the following formula will import data from both sheets, it will also import the blank rows, so you might have to scroll down hundreds of rows in order to see the data from the second sheet (and this might give your the wrong impression that the second sheet is not getting imported):
{
IMPORTRANGE("SPREADSHEET_ID","CurrentMonth!$A:$J");
IMPORTRANGE("SPREADSHEET_ID","All2020!$A:$J")
}
You can use QUERY in order to filter out blank rows:
=QUERY(
{
IMPORTRANGE("SPREADSHEET_ID","CurrentMonth!$A:$J");
IMPORTRANGE("SPREADSHEET_ID","All2020!$A:$J")
},
"SELECT * WHERE Col1 IS NOT NULL ORDER BY Col1 DESC"
)
Note:
I thought you'd like to sort the data according to the date in column A, please remove ORDER BY Col1 DESC if that's not the case.
I need help on replicating below formula into Google sheet. Since google sheet does not support Aggregate, I am having difficulties replicating it into google sheet.
I need a formula which will list out all partial match item based on specific text from data.
Help is much appreciated.
Below is the formula I am using in excel:
=IFERROR(IF(F5>$D$9,"",INDEX($B$5:$B$16,AGGREGATE(15,6,(ROW($B$5:$B$16)-ROW($B$5)+1)/ISNUMBER(SEARCH($D$5,$B$5:$B$16)),F5)))," ")
and below is sample data and result outcome:
use in F2:
=QUERY(A2:A; "select A where A contains '"&C2&"' limit "&C6; 0)
or case insensitive:
=QUERY(A2:A; "select A where lower(A) contains '"&LOWER(C2)&"' limit "&C6; 0)
I know how sumif works when I need to access it within the same Google "workbook" (using the analogy from excel). By workbook I mean a collection of sheets, not sure whether there is a different way to refer to Google workbook.
For example in the sheet (Example 3): https://docs.google.com/spreadsheets/d/1Dm-N-1X38zHartE3JbPUtWDnYwEpkGHl6v06huvjSa8/edit#gid=0
I have Sheet2, with column A contain strings and column B containing numerical value. On sheet 1, I have a sumif function which can be query data stored in Sheet2, and sum the cells which match A1 in Sheet1.
The problem starts happening when I try to refer to ranges in a completely different workbook, which is shown below.
I am trying to do a sumif over 2 ranges from a different "workbook". The data is stored here (Example 2): https://docs.google.com/spreadsheets/d/1P5Inf09fLSRmsGbG7LwlE4V-r7DzqY0SB5tJuMKMZH0/edit#gid=0
The Sumif function is in Cell B1 of the following sheet (Example 1):https://docs.google.com/spreadsheets/d/1AitilELd6w7Dbv9d-mKhBYGTBaO6DdkU29Y5mofX2TI/edit#gid=0.
From my understanding importrange is typically used to refer to ranges in completely different workbooks, as a result I use importrange as the first and last arguments in the sumif function in the Sheet Example 1.
What am I doing wrong? Why is this not working?
Can anybody help?
Thanks a lot
See if this query does what you want:
=SUM(query( QUERY( Importrange("1P5Inf09fLSRmsGbG7LwlE4V-r7DzqY0SB5tJuMKMZH0","Sheet1!A1:B10") ) , "select Col2 where Col1 contains '"&A1&"'" ) )