I've got a range of cells in Google Sheets that contain a mixture of text and numbers, or just text, or even blank cells. For example:
- Yes 32
- Yes 46
- No 1
- Apologies 23
- (and blank cells)
I want the sum of just the numbers in cells that contain the word 'Yes' as well as a number. So in the above list of example values, I'd want the sum of 32 + 46 = 78.
I am currently using this formula, which came from this question:
This formula works fine if all the cells contain numbers, but I now need it to ignore the cells that don't contain numbers or are blank, hence this new question.
The above formula gives me errors like this for cells that don't contain numbers:
Error Function REGEXEXTRACT parameter 2 value "(\d+)" does not match text of Function REGEXEXTRACT parameter 1 value "Apologies".