I'm trying to compare two arrays and remove any matches(Partial). This seems like it should be simple but I can't wrap my head around it.
The sheet is found here:
https://docs.google.com/spreadsheets/d/1_jPJOST-8DbpTwVcoFGXFzdpo-1bXSMnwJcgEMnNk3U/edit?usp=sharing
Try:
=FILTER(A2:A5,NOT(REGEXMATCH(A2:A5,JOIN("|",B2:B3))))
I used the premise on that but used textjoin to make sure I could add more rows. Thanks!
=FILTER(A2:A,NOT(REGEXMATCH(A2:A,textJOIN("|",TRUE, B2:B))))
Related
I am trying to duplicate all values in an array in my sheet. I have {1,6,14,15} and I want to output {1,1,6,6,14,14,15,15}. I would like to do this exclusively with functions. I have seen the VSTACK function, which seems very useful, however joining the insider thing seems like a hassle and would not allow this spreadsheet to be usable across other devices easily.
I have tried the CONCAT function, however this simply returns 161415161415 which is not helpful to me. The various alternatives to VSTACK all remove duplicates, which is exactly not what I am looking for. Besides all of those alternatives are lengthy and hard for me to wrap my head around.
You could use EXPAND() here:
=LET(arr,{1,6,14,15},TOROW(IFERROR(EXPAND(arr,2),arr),,1))
Note that 2 will define how often you want to duplicate the input.
If you have LET and SEQUENCE:
=LET(ζ,{1,6,14,15},INDEX(ζ,SEQUENCE(,2*COUNTA(ζ),,0.5)))
I'm trying to put the following formulas inside an ArrayFormula but the result is wrong (keep providing the first row result):
Working in each single cell
=INDEX($D$2:$AKA;match($A2:A;$A$2:A;false);MATCH(DATE(YEAR(TODAY());MONTH(TODAY());1);$D$1:$AKA$1;false))
Showing the same result in all cells
=arrayformula(IF(LEN($A$2:A);INDEX($D$2:$AKA;match($A2:A;$A$2:A;false);MATCH(DATE(YEAR(TODAY());MONTH(TODAY());1);$D$1:$AKA$1;false));))
Gsheet example
Thanks in advance,
Nick
use:
=INDEX(IFERROR(HLOOKUP(EOMONTH(TODAY(); -1)+1; D1:1000; IF(A2:A="";;ROW(A2:A)); 0)))
You may also try QUERY() approach.
=QUERY(INDEX(D2:5000;;MATCH(EOMONTH(TODAY();-1)+1;D1:1));"limit " & COUNTA(A2:A))
I'm trying to write a cell formula which can essentially create a single playlist of songs.
Currently the songs are grouped by decade, but I'd like to be able to see a single list of everything that has been ticked.
I tried an array formula, but it only returned the first ticked song. Plus not sure how to make the array formula include the adjacent lists.
I tried a FILTER function, it works for one list of songs, but I don't know how to get it to append the other lists on the end.
Could I use a QUERY function? Not sure how though.
Many thanks!
try:
={"LIST"; FILTER({C:C; F:F}; {B:B; E:E}=TRUE)}
awesome question! You were super close in your filter example, one more filter in your array would've done it :)
Example Image:
Example Formula:
={"LIST"; FILTER(C:C, B:B=TRUE); FILTER(F:F, E:E=TRUE)}
Formula that combines all the sheets in my project and removes any empty cells
yes, change this:
;},
to this:
},
I'm sure others have already asked this, but is it possible to insert an element into the next available index of an array without using a for-loop to find that index first? Almost like a list.add() function but for arrays in C.
no, you will have to loop through the array.
If it's really list functionality you want you could implement a simple linked list instead of using arrays, for example like this: http://www.cprogramming.com/tutorial/c/lesson15.html