## COUNTIF - How to add sequence numbers within groups of repeating values

Occasional Contributor

## COUNTIF - How to add sequence numbers within groups of repeating values

In Excel, I can apply sequential numbers within each group of values.

For example - Column A has groups of values which Column B applies sequence numbers to the members of each group.

The number sequence in Column B is generated by COUNTIF(\$A\$2:A2,A2) which is copied in every cell in the column.

I see that Anaplan's answer to COUNTIF is to combine an IF THEN statement with the SUM function. How can this combination be used to create the grouped numbered sequence?

Thanks - Guy

2 REPLIES 2
Highlighted
Contributor

## Re: COUNTIF - How to add sequence numbers within groups of repeating values

Hi Guy,

You can try RANK function here (attached screenshot for reference).

Hope it works for ur scenario.

Thanks

Pooja

Occasional Contributor

## Re: COUNTIF - How to add sequence numbers within groups of repeating values

Thank you Pooja! Your solution worked very well.

Best - Guy