Reputation: 741
I am facing a problem with values of...
I want the SUM of each UNIQUE key from Other sheet,
I two sheets:
KEY | VALUE |
---|---|
abc | 123 |
KEY (unique) | Total VALUE (sum) for each key |
---|---|
abc | Total Value |
I have used the this formula:
=SUMIF(Sheet1!A:A;A2;Sheet1!B:B)
Using Google Sheets I have the correct value. But, I do not know why excel returns different values.
I have checked by THE SUM of Column VALUE trying:
Outputs:
Excel and Google Sheets have different Outputs Using the same data, and the same formulas, Google sheets returns the correct value.
Excel SumIF and Excel Pivot Tables have different Outputs Using the same data Excel Pivot Tables returns the correct value.
Can anyone give a help here?
Thanks !!!!
Upvotes: 0
Views: 1331
Reputation: 60464
Another solution to the problem mentioned by @Rory is to force SUMIF
to see that value as text: (IF your keys are all the same length)
=SUMIF(DATA!A:A,'SUM IF'!A3&"*",DATA!B:B)
or
=SUMIF(DATA!A:A,"*"&'SUM IF'!A3,DATA!B:B)
Upvotes: 0
Reputation: 34075
It's because your keys are long numeric strings and SUMIF/COUNTIF will try to convert those to numbers but, because Excel only works with 15 significant figures in numeric data, you get a lot more matches for each item. You could use:
=SUMPRODUCT(--(DATA!$A$3:$A$7996=A3),DATA!$B$3:$B$7996)
instead.
Upvotes: 1