Home > Enterprise >  Is there a function/script to auto-label cells based on the value in another cell?
Is there a function/script to auto-label cells based on the value in another cell?

Time:07-01

I am working on a class register where the number of lessons of each subject needs to have a running total. I am struggling to find a way to calculate the total based on the subject name.

The output should read as in the image below where the number of lessons of each subject is shown in the second column. I am working in Google Sheets.

Class Register

CodePudding user response:

This formula should work for you:

=countif(indirect("B1:B"&row()), indirect("B"&row()))

Place it in the top cell that you want to start counting at and drag down.

ex

Please let me know if you have any issues with this

  • Related