-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code is not pulling correct numbers on entry #3
Comments
@delize Try removing the quotes around the last parameter:
If it still doesn't work, perhaps you can share the document so I can take a look. |
I get the following results (same issue, except now it displays #NUM) with the above string. I unfortunately can't share this specific spreadsheet, but I can try to share a different spreadsheet where I get the same result. I have displayed pictures of the initial spreadsheet below. I know in the last picture it says #00ff00, as I was testing a green background instead of red for that "getbackgroundcolor" Here is a spreadsheet where I receive the same issue. |
Unless I am mistaken, shouldn't the count be two? As the background color in cells B4 and C4 do not meet #ff0000 requirement? |
It's not a count; it's a sum. And if the sum encounters cells with non-numeric values it assumes them to be 0. |
Yeah, I just realized that after re-reading the description again. Im mistaken. Thanks for your instant response time though. My bad. |
Awesome! Glad this is solved. |
After coming across your code on stackoverflow, it looks like this is exactly what I need. I was pretty excited to try it out as it would help me simplify my spreadsheet
So I set it up, used the "getBackgroundColor" function with "" around the cell number, and it pulls the color code (in this case #ff0000 or #b7b7b7). However, when I use the "sumWhereBackgroundColorIs("#ff0000","B3:B500", "", "B3:B500")" it responds with 0 cells holding that color, even though I have in B3 that is being used by getBackgroundColor to let me know at hex code to check for.
I really do think this would do exactly what I am hoping for. I tried using the Google Scripts debugger, but it isn't incredibly helpful in this situation (as it expects there to be a range of something, and there isn't one).
The text was updated successfully, but these errors were encountered: