I want to do a very simple SUMIF operation in Google Sheets but somehow the result is not what I expect. I believe I followed the syntax correctly and if I do the same in Excel, I get the result "2" that I'm after. Does anyone know the cause for this behavior? And hopefully the solution? Thanks!
Update: Removing the quotes, the result is the same. The cell with "2" is highlighted for reference of the content.
CodePudding user response:
I think the problem is that you may have a different format or something related to it that may be affecting the function as it may not be taking the values correctly.
I just copied the exact same values that you were using, then changed the format to "number" from the input and output cells and it started working without any problem.
I made a test by changing any other values from the column to be 2 and it works fine (see screenshot).
Second example:
This is how I changed it when going to Format
> Number
> Custom number format
, and selected the first option.