• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel Formula count

thifu3

New Member
Hi guys,

Could you please help me on this.

john 25,
doe 26,
john 35,
bon 28,
john 35.

how do i calculate the total amount of john?
 
Hi thifu3,

There is the exotic way and the practical way. Both have multiple solutions. But let me ask you: is it possible to keep the data separate in your workbook? If so, then I suggest you do so.
The next step would be something like this:
Code:
=COUNTIF(A:A,"John")
 

Attachments

  • thifu.xlsx
    11.6 KB · Views: 4
=SUMPRODUCT(--(A4:A9="John"),B4:B9)
or
=SUM((A4:A9="John")*B4:B9) Ctrl+Shift+Enter
 
The COUNT function counts the number of cells that contain numbers, and counts numbers within the list of arguments. Use the COUNT function to get the number of entries in a number field that is in a range or array of numbers.
 
Back
Top