Running Count of Multiple Values in a List in Google Sheets

Have you ever wondered how to easily populate a column with the running count of multiple values in Google Sheets? Well, look no further! I have the perfect solution for you. In this article, I will share with you a powerful array formula that will make this task a breeze.

The Simple Running Count Formula

Before we dive into the array formula, let’s quickly go over a simple running count formula for a single value. You can use the COUNTIF function to accomplish this. Here’s how the formula looks like:

=IF(A2="Apple",COUNTIF($A$2:A2,"Apple"),"")

Simply replace “Apple” with the value you want to count, and copy the formula down the column. Easy, right?

But what if you want to count multiple values? That’s where the array formula comes in.

The Formula to Populate the Running Count of Multiple Values

In this example, I have used the following array formula in cell C2:

=Array_Constrain(iferror(sort({row(A2:A)-row(A2)+2-match(sort(A2:A),sort(A2:A),0),SORT(ROW(A2:A)+2-row(A2)+2,A2:A,1)},2,1),),9^9,1)

This formula will give you the running count of all the items in your list. The best part is that it’s self-expanding, so you only need to enter it in cell C2 and let it do its magic.

count of occurrences of a value in a list

This Google Sheets running count formula supports infinite ranges, so you don’t have to worry about the size of your list. It’s truly a time-saver!

Modifying the Formula for Different Columns

Now, I understand that your list may be in a different column than Column A. Don’t worry, I’ve got you covered. Here’s how you can modify the formula to work with any column:

  1. Replace all instances of “A2:A” in the formula with your desired range. For example, if your list is in column B starting from cell B4, replace “A2:A” with “B4:B”.
  2. That’s it! You’re all set to use the modified formula.

array based multiple occurrences counter formula

And there you have it! You now know how to populate a column with the running count of multiple values in Google Sheets. It’s a game-changer that will save you time and effort.

If you want to learn more about Google Sheets functions and unleash the full potential of this amazing tool, visit Crawlan.com for more tips and tricks.

So go ahead, give it a try, and enjoy the power of the running count formula in Google Sheets. Happy spreadsheeting!

Related posts