Search code examples
excelif-statementexcel-formulaworksheet-function

List row number of each first value of a repeated series


In a spreadsheet I have a column of this structure:

10.00
10.00
10.00
10.00
10.00
10.00
10.00
10.00
20.00
20.00
20.00
20.00
20.00
100.00
100.00
100.00
100.00
810.00
810.00
810.00
810.00
990.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
10.00
10.00
10.00
10.00
10.00

So lots of 10.00 followed by a couple of other values and then 10.00 starting again.

How can I get the row number of only the first 10.00 of each block of 10.00s?


Solution

  • Assuming your lists starts in A2 (with something other than 10 in A1), in a spare column Row2 and copied down to suit:

    =IF(AND(A2=10,A1<>A2),ROW(),"")