I want to display Sl. No. in a column based on a flag field in another column.
If flag is “m”, then the Sl. No corresponding to that item is incremented by 1
If flag is “s”, then the Sl. No is corresponding to that item is indicated as main item number + 0.01
If "h" is encountered, numbering should be restarted.
Presently, I have used =IF(B3="","",IF(B3="m",COUNTIF($B$2:B3,"m"),LOOKUP(10^35,$D$1:D2)+0.01)) in Cell D3.
The formula delivers the sequence of numbering as desired. But, the numbering does not restart (see Cell D17 in image below where it should have been 1.00 instead of 4.00).
Note: As per my requirement, there are blank rows between the rows of "Flag" field as shown.

Aucun commentaire:
Enregistrer un commentaire