SOLVED

sum variant according to excel example

%3CLINGO-SUB%20id%3D%22lingo-sub-2713241%22%20slang%3D%22de-DE%22%3Esum%20variant%20according%20to%20excel%20example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2713241%22%20slang%3D%22de-DE%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethis%20site%20shows%20an%20example.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fde-de%2Foffice%2Fz%25C3%25A4hlenwenn-funktion-e0de10c6-f885-4e71-abb4-1f464816df34%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.microsoft.com%2Fde-de%2Foffice%2Fz%25C3%25A4hlenwenn-funktion-e0de10c6-f885-4e71-abb4-1f464816df34%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20i%20would%20like%20to%20count%20the%20number%20of%20apples%20(32%2B86)%20not%20the%20number%20of%20lines%20(A2%2BA5%3D2).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20anyone%20have%20an%20idea%20how%20i%20can%20solve%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2713241%22%20slang%3D%22de-DE%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2713293%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20variant%20according%20to%20excel%20example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2713293%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1144941%22%20target%3D%22_blank%22%3E%40Alexander10%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUse%20SUMIF%20instead%20of%20COUNTIF%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DSUMIF(A2%3AA5%2C%20%22%C3%84pfel%22%2C%20B2%3AB5)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAuf%20Deutsch%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DSUMMEWENN(A2%3AA5%3B%20%22%C3%84pfel%22%3B%20B2%3AB5)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2713317%22%20slang%3D%22en-US%22%3ERe%3A%20sum%20variant%20according%20to%20excel%20example%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2713317%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1144941%22%20target%3D%22_blank%22%3E%40Alexander10%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESUMIF()%3CBR%20%2F%3E%3DSUMIF(ColumnWithFruits%2C%22Apple%22%2CColumnWithFruitValues)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

 

this site shows an example.

https://support.microsoft.com/de-de/office/z%C3%A4hlenwenn-funktion-e0de10c6-f885-4e71-abb4-1f464816...

 

But i would like to count the number of apples (32+86) not the number of lines (A2+A5=2).

 

Do anyone have an idea how i can solve it?

 

Thank you very much.

 

Best regards,

Alex

3 Replies
best response confirmed by Alexander10 (New Contributor)
Solution

@Alexander10 

Use SUMIF instead of COUNTIF:

 

=SUMIF(A2:A5, "Äpfel", B2:B5)

 

Auf Deutsch:

 

=SUMMEWENN(A2:A5; "Äpfel"; B2:B5)

 

@Alexander10 

 

SUMIF()
=SUMIF(ColumnWithFruits,"Apple",ColumnWithFruitValues)

 

Thank you very much for your fast reply! It works well.