I am new to Google spreadsheet functions and trying to apply a formula in following way:
I have sheet1
& sheet2
in one workbook (name-formula4). I am doing sumproduct of filtered range from sheet1
to sheet2
with the following formula:
=SUMPRODUCT(filter(Sheet1!$A$1:$A$401, (Sheet1!$B$1:$B$401>= E1) * (Sheet1!$B$1:$B$401<= E2)))
Formula is perfectly ok when the range selected(Sheet1!$B$1:$B$401>= E1) * (Sheet1!$B$1:$B$401<= E2)
has some value & is not empty. However if I leave the cells of said range empty (sheet1!b1:b3
) -which are required to meet criteria- then this gives the error No Matches are found in filter evaluation
. In a nut shell, I want to display 0
rather than displaying the error or NA
.
Note that I cannot fill entire the selected B
column since this receives live data from the form and not previous decided which one.
Please look at the following link for details and help in correcting the above formula:
https://docs.google.com/spreadsheets/d/1HTXf4VG2JupiP9UqCLRyAddYjhsom1leQOI9-DwfMaY/edit#gid=0
We can replace #DIV/0 with 'N/A' (or anything else of our choosing) by updating the formula to =IFERROR((C5/B5 - 1),“N/A”) . IFERROR checks the value for (C5/B5) -1 , sees that the result is an error because you're trying to divide by zero, and so returns the text “N/A” .
=IFERROR(SUMPRODUCT(filter(Sheet1!$A$1:$A$401, (Sheet1!$B$1:$B$401>= E1) * (Sheet1!$B$1:$B$401<= E2))),0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With