Features of !SEMTools
↑ Navigate Excel tasks and !SEMTools add-in features ↑

Statistical metrics in Excel

, creator of !SEMToolsUpdated 4 min readTopics: Data analysis, Numbers and calculations
Share of total, cumulative share and ABC analysis in Excel
Share of each value, the running share and ABC categories: A filled red, B yellow, C green.

Excel has many tools for data analysis, but some simple metrics about the elements of a list are surprisingly awkward to get. That’s why the EXTRACT group of the !SEMTools add-in has a Statistical metrics (Count) section. It calculates several metrics for the elements of the selected range in a couple of clicks, without formulas. Below, each metric with the equivalent formula, so you can compare.

Number of occurrences of an element in a range

This tool shows how many times each element occurs in the selected range. It’s useful for finding the most frequent values and analyzing the distribution of the data. More examples, including the occurrence number and a case-sensitive count, are in the article on how to count repeated values in Excel.

ElementOccurrences
A3
B2
C1
A3
B2
A3

The formula with the COUNTIF function, with the elements in A1:A6:

=COUNTIF($A$1:$A$6,A1)
How many times each element occurs
B2=COUNTIF($A$2:$A$7,A2)
AB
1ElementOccurrences
2apple3=COUNTIF($A$2:$A$7,A2)
3pear2=COUNTIF($A$2:$A$7,A3)
4apple3=COUNTIF($A$2:$A$7,A4)
5plum1=COUNTIF($A$2:$A$7,A5)
6pear2=COUNTIF($A$2:$A$7,A6)
7apple3=COUNTIF($A$2:$A$7,A7)

Fully fixed range $A$2:$A$7: every row counts across the whole list. apple occurs 3 times, pear 2, plum 1.

For a list of unique values with their counts, see how to count unique values in Excel.

Count how many times each value repeats and number each occurrence in Excel
«paris» and «Paris» count as the same value. The second column numbers the occurrences in order.

In !SEMTools: EXTRACT → Count → Element count in range. Letter case is ignored.

Occurrence number of an element in a list

This tool shows which occurrence of the element this is: how many times it has already appeared above, plus 1. It helps track the order in which elements appear, and the first occurrences (1) are exactly the unique values.

ElementOccurrence number
A1
B1
C1
A2
B2
A3
=COUNTIF($A$1:A1,A1)
Which occurrence this is
B4=COUNTIF($A$2:A4,A4)
AB
1ElementOccurrence #
2apple1=COUNTIF($A$2:A2,A2)
3pear1=COUNTIF($A$2:A3,A3)
4apple2=COUNTIF($A$2:A4,A4)
5plum1=COUNTIF($A$2:A5,A5)
6pear2=COUNTIF($A$2:A6,A6)
7apple3=COUNTIF($A$2:A7,A7)

Only the start is fixed, so the range grows: the third apple (A7) gets 3. Filter by 1 to get the unique values.

Note the reference: only the start is fixed, so the range grows as you fill the formula down.

In !SEMTools: EXTRACT → Count → Occurence number.

Share of each number in the total

This tool calculates the share of each value in the total of all numbers in the range: the contribution of each element.

ElementValueShare of the total
A1010%
B2020%
C3030%
A1010%
B2020%
A1010%
=B1/SUM($B$1:$B$6)

Apply the Percentage format to the result.

In !SEMTools: EXTRACT → Count → Share from sum (numbers).

Cumulative share of the total

This tool calculates the share of each element in the total on a running basis: the running total divided by the grand total. It shows how the contribution grows as elements accumulate.

ElementValueRunning totalCumulative share
A101010%
B203030%
C306060%
A107070%
B209090%
A10100100%

The running total and the cumulative share:

=SUM($B$1:B1)
=SUM($B$1:B1)/SUM($B$1:$B$6)
Share and cumulative share
C2=B2/SUM($B$2:$B$5)
ABCDE
1RegionSalesShareRunningCum. share
2North40040%=B2/SUM($B$2:$B$5)400=SUM($B$2:B2)40%=SUM($B$2:B2)/SUM($B$2:$B$5)
3South25025%=B3/SUM($B$2:$B$5)650=SUM($B$2:B3)65%=SUM($B$2:B3)/SUM($B$2:$B$5)
4East20020%=B4/SUM($B$2:$B$5)850=SUM($B$2:B4)85%=SUM($B$2:B4)/SUM($B$2:$B$5)
5West15015%=B5/SUM($B$2:$B$5)1000=SUM($B$2:B5)100%=SUM($B$2:B5)/SUM($B$2:$B$5)

Share: each value divided by the total of 1,000. Running total and cumulative share grow row by row; the last row is always 100%.

More about it in the article on cumulative share in Excel.

In !SEMTools: EXTRACT → Count → Accumulated share.

ABC analysis

ABC analysis splits elements into three categories, A, B and C, by their importance, based on the cumulative share. More about the method and the procedure in the article on ABC analysis in Excel.

The Statistical metrics group keeps growing, and new tools for data analysis are planned. All of them return values right in place or into the next column, without formulas to type and fill down.

In !SEMTools: EXTRACT → Count → ABC-analysis (color cells).

Count occurrences, shares, cumulative shares and ABC classes for whole columns in a couple of clicks, without formulas.
!SEMTools solves this and hundreds of other tasks right in Excel!

Summary: statistical metrics without formulas

I hope you found what you were looking for on this page. COUNTIF covers occurrences, a simple division covers shares, and SUM with a growing range covers running totals. For regular analysis of long lists, the !SEMTools procedures calculate all these metrics in place.