Automatically adding serial numbers in Excel is easy, but I would like to know if there is an easier way to add serial numbers only columns near new dates. I simple works, want to add serial numbers to each days, without any counting duplicates. Each date should be counted only once.
I am only able to achieve the following.
But I would like to get the following results, just by dragging from the top column.
CodePudding user response:
Assuming the No. header is in A1
, in A2
:
=IF(B2<>B1,MAX(A$1:A1) 1,"")
and copied down.
CodePudding user response:
or may be it can help too
=IF(COUNTIF($B$2:B2,B2)>1,"",MAX($A$1:A1) 1)