Forum Discussion
Luis BERNAL
Feb 21, 2019Copper Contributor
Sumif not blank
Hello! I want to use a formula to ignore blank cells when i sum blank spaces but if I use "Sum(J6:J9)" it will give me a "0" even if there's no values in the cell, and what i'm trying to do is basic...
- Feb 22, 2019
Another variant
=IF(ISNA(IFERROR(LARGE(A1:A5,1),NA())),"",SUM(A1:A5))
SergeiBaklan
Feb 21, 2019Diamond Contributor
Luis BERNAL
Feb 21, 2019Copper Contributor
- SergeiBaklanFeb 22, 2019Diamond Contributor
Another variant
=IF(ISNA(IFERROR(LARGE(A1:A5,1),NA())),"",SUM(A1:A5))
- ChristaPSep 25, 2024Copper Contributor
Thank youSergeiBaklan
- Luis BERNALFeb 22, 2019Copper ContributorThank you so much! this work
- TwifooFeb 21, 2019Silver ContributorHello Luis,
Assuming your range is A1:A5 and you want the result to appear in A6, your formula in A6 is:
=IF(COUNTIF(A$1:A5,"")=ROWS(A$1:A5),
"",
SUM(A$1:A5))
Corollary to my earlier statement, Blank Cells are not, but are counted as, Empty Text (""), such that this formula, although longer, achieves the same result:
=IF(SUMPRODUCT(--ISBLANK(A$1:A5))=ROWS(A$1:A5),
"",
SUM(A$1:A5))