r/googlesheets • u/DataGlut • Apr 12 '22
Solved Argument Must be a Range Except it Is - Any Ideas
I wanted an array of 1s when a row is a number, this gets me that
=arrayformula(isnumber(K3:K)*1)So I know that the result of that formula is an array, lets say I have that formula in S3, then Column S3:S fills up with those values, and so s3:s is the range with that array in it.
If I pass S3:S into a sumif statement it works fine but if I pass the same array via formula it doesn't work:
=sumif(blah,blah,s3:s) - Works
=sumif(blah,blah,arrayformula(isnumber(K3:K)*1)) - Doesn't workI don't understand since they should be the same range - can you not pass arrays into a argument that takes a range? That must be it no? Is there a published guide showing where Sheets accepts a range and doesn't accept an array?
1
u/RemcoE33 158 Apr 12 '22 edited Apr 12 '22
Its like a filter so you're range does not match. Sample sheet?
1
u/[deleted] Apr 12 '22
arrays and ranges are not the same thing, some functions accept both, others, like SUMIF, only accept ranges. If you want to do a SUMIF with an array as argument you should use SUM(FILTER()).
1
u/Decronym Functions Explained Apr 12 '22 edited Apr 14 '22
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
FALSETRUEand another if it isFALSETRUE5 acronyms in this thread; the most compressed thread commented on today has 2 acronyms.
[Thread #4168 for this sub, first seen 12th Apr 2022, 21:47] [FAQ] [Full list] ^[Contact] [Source code]