Question

I have a column which takes input from a List (A, B, C, D) How to obtain the number of times that 'A' has been selected in this column?

Was it helpful?

Solution

Let's say your data is in column A.

It has many rows and there are only four different types of entries, like this:

enter image description here

There are several ways you can count how many apples or bananas are in the list.

Option 1 - a formula To prepare for that, create a list of the four fruit types in cells C1 to C4, with apples, bananas, oranges and cherries as the values. Then in D1 enter the formula

=COUNTIF(A:A,C1)

Copy the formula down. The result should look like this:

enter image description here

Option 2 - Pivot table

Click anywhere within column a, then click Insert > Pivot Table. Drag the data field into the row area and drag the data field again into the Values area. The result will look like this:

enter image description here

If you have any questions about the particular aspects of these suggestions, please post in Superuser.com. Stackoverflow.com is really meant for programming questions, not basic software usage.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top