Number cells in changing ranges

jm saf 166 Reputation points
2022-11-18T13:11:53.967+00:00

Hi
I need a formula to number the number of people in each state.
The formula should give the result of the column order

261943-imagen.png

Thanks in advance

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

Answer accepted by question author
  1. Viorel 125.7K Reputation points
    2022-11-18T14:20:12.893+00:00

    Try this formula: =COUNTIF($B$2:INDIRECT("B"&ROW()),INDIRECT("B"&ROW())).

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. jm saf 166 Reputation points
    2022-11-19T19:27:54.23+00:00

    Hi Viorel:
    Great!! That's solve my problem
    Thanks for your help and your time
    Regards

    0 comments No comments

  2. Ashish Mathur 100.8K Reputation points Volunteer Moderator
    2025-07-27T02:01:10.65+00:00

    Hi,

    In cell C2, enter this formula

    =BYROW(B2:B8,LAMBDA(a,COUNTIF(B2:a,a)))

    Hope this helps.

    User's image

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.