Hey Group,

I have a list of class names in a spreadsheet and in the column to the left of the names, I have:

=IF(ISBLANK(P2),"",1+COUNTIF(RawCourseList,"<"&P2))

The purpose of this COUNTIF formula is to assess the number of entries within a range that are "less than" the class name (i.e. if along a column you have "A", "B", & "C" and you applied this formula in the cell to the left of "C", you would get "3" - A and B are both "less than" C, so this gets you 2, then the formula adds 1 to get 3 . This is essentially alphabetizing the list by creating a column that shows where each class name would fall if the list was sorted)

However, the issue comes when I have two "C"s in the column. If I had "A", "B", "C", "C", & "D" along a column and applied the formula, I would get "1", "2", "3", "3", "5", where "3" is repeated and I never get "4". I know there is a way to change it so that the second "3" becomes a "4" but I forget how. Can anyone help me with this?

*Using Data>Sort would NOT solve my issue.

Thanks!