I would like to sum a range where a corresponding range does not contain "2nd".
Here is the opposite of what I want:
=sum(filter(fUsers,regexmatch(fLabel,"2nd")))
Which runs and returns 1,150.
I have looked at and tried to copy these SO posts:
- Regular Expressions and negating a whole character group
- How to negate specific word in regex?
- Java RegEx that matches anything BUT literal string 'NIL' or 'nil'
I know that if I go to the data set in question and use filtering, I should have 15,017 returned.
Based on these posts here is what I have tried:
=sum(filter(fUsers,regexmatch(fLabel,"^(?!2nd$).*"))) // returns #N/A no matches found in filter evaluation.
=sum(filter(fUsers,regexmatch(fLabel,"^(?!.*2nd).*$"))) // returns #N/A no matches found in filter evaluation.
How can I get Gsheets to sum values in range fUsers where fLabel does not contain "2nd"?