• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

need help series numbering by vba

Hi ,

A simple formula will do the job ; why do you want VBA ?

=IF(OR(B2 <> B1, A2 <> A1), MAX(C$1:C1) + 1, C1)

Enter this in cell C2 and copy it down.

Narayan
 
A demonstraton as a very beginner starter :​
Code:
Sub Demo4Noob()
        [C2].Value = 1
    With Range("C3", [A1].End(xlDown)(1, 3))
        .Formula = "=C2+(B3<>B2)"
        .Formula = .Value
    End With
End Sub
Do you like it ? So thanks to click on bottom right Like !
 
Back
Top