Home > database >  Counting nth occurrence of a value
Counting nth occurrence of a value

Time:11-20

Hoping I can be clear about this. I'm designing a digital lost & found system for a school I work for. Parents will fill out a google form which feeds to a spreadsheet, and I want to be able to track 1st, 2nd, 3rd, etc. requests for any given item (numbered 1-58).

Essentially, I want the sheet to look like:

Name Grade Item Request No.
Sally 1st 51 1
Joey 2nd 3 1
Suzy 2nd 51 2
Sally 1st 27 1
Amahl 3rd 51 3

And so on...I imagine this can be done using vlookup, but I'm drawing a blank as to how...

CodePudding user response:

Try a dynamically expanding range:

=countifs($C$2:C2, C2)

Where the values you're counting are in C:C and you make the first bound of the range static ($C$2) and the second dynamic (C2). Then when you fill down, the range will grow.

See this demo: enter image description here

  • Related