1

I hope everyone is doing well I have a question regarding whether we can count multiple values at once in excel as below:

what is in column

**Name**
a
a
a
b
b
c
a

what I want to count individuals at once as below:

**a**    **b**     **c**
4          2          1

Thank you in advance

5
  • 1
    Pivot table maybe? Commented Sep 28, 2020 at 19:05
  • I tried pivot but its a single column Commented Sep 28, 2020 at 19:06
  • And what is the problem with single column? Commented Sep 28, 2020 at 19:12
  • @basic as where to put this column in pivot table to get desired output? Commented Sep 28, 2020 at 19:22
  • @MaxMiak if you want a pivot table just put the Name column in both columns and values. Commented Sep 28, 2020 at 19:31

1 Answer 1

4

For Excel 365.

In C1 enter:

=TRANSPOSE(UNIQUE(A2:A8))

In C2 enter:

=COUNTIF($A$2:$A$8,C1)

and copy across.

enter image description here

EDIT#1:

Please note the excellent suggestions made by JvdV and chris neilsen. These improvements will allow column A to be modified (items added/removed) without having to go back and mod the formulae.

In C1 enter:

=TRANSPOSE(UNIQUE(FILTER(A:A,(ROW(A:A)>1)*(A:A<>""))))

and in C2 enter:

=COUNTIF(A:A,C1#)
Sign up to request clarification or add additional context in comments.

8 Comments

Shouldn't the references be $A2:$A8?
@VBasic2008 Great question! .................it turns out that in the new dynamic spillable formulas, the references do not propagate with the spill, so the $ are not needed.
You can make the Count Spill with CountIf(A2:A8, C1#)
And you can make the solution fully dynamic wit (in C1) =TRANSPOSE(UNIQUE(FILTER(A:A,(ROW(A:A)>1)*(A:A<>"")))) and (in C2) CountIf(A:A, C1#)
Little fun alternative: =CHOOSE({1,2},TRANSPOSE(UNIQUE(A2:A8)),COUNTIF(A2:A8,TRANSPOSE(,UNIQUE(A2:A8))))
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.