Forum Discussion

Mustafa_Mageed's avatar
Mustafa_Mageed
Copper Contributor
May 16, 2024

fill series

I want to fill series in a column and skip those cell which has some values (text). and start Again from 1 in the next cell after text

  • AdamChmielewski's avatar
    AdamChmielewski
    Copper Contributor

    Here is a simple way through a formula

    Lets say that you have the values in column A

     

    =IF(A2<>"";"";IFERROR(B1+1;1))

     

    The logic is to check if you have any value in the same row. If there is something then leave blank

    If the cell if empty then return what you had in the column with your numbering bigger by one.

    The iferror is for the first row where you want to start the numbering. As you get an error by adding 1 to a text value, then just return 1.

     

    If you want to have the original value and the subsequent numbers in the same column, then the formula would be something like

    =IF(A2<>"";A2;IFERROR(B1+1;1))

     

     

    value in column A1st solution2nd solution
    A A
     11
     22
    B B
    C C
     11

Resources