Sophie1979
XLDnaute Nouveau
Comment arriver à une décimal supérieur à 9 ?
Merci
Merci
Sub NouveauChapitre()
With Range("B" & Rows.Count).End(xlUp) 'colonne B ou au-delà, à adapter
.Cells(2, 0) = Application.Max(Columns(.Column - 1)) + 1
End With
End Sub
Sub NouvelArticle()
With Range("B" & Rows.Count).End(xlUp) 'colonne B ou au-delà, à adapter
If .Cells(2, 0) <> "" Then
.Cells(2) = .Cells(2, 0) & ".1"
Else
.AutoFill .Resize(2)
End If
End With
End Sub
Sub NouveauChapitre()
With Range("A" & Rows.Count).End(xlUp)(2) 'colonne à adapter
.NumberFormat = """Chapitre ""0" 'format nombre personnalisé
.Value = Application.Max(Columns(.Column)) + 1
End With
End Sub
Sub NouvelArticle()
With Range("A" & Rows.Count).End(xlUp) 'colonne à adapter
.Cells(2).NumberFormat = "@" 'format Texte
If .Text Like "Chapitre*" Then
.Cells(2) = .Value & ".1"
Else
.AutoFill .Resize(2)
End If
End With
End Sub
il ne s'agit donc pas d'un système décimal mais d'une concaténationEn fait il s'agit de numérotation (numéros d'article ) 2.1 ; 2.2 ; 2.3 ; .... ; 2.9 ; 2.10 ; 2.11 ; ....
est-ce qu'une formule existe adapté à ma situation
=[@N°]&"."&NB.SI(A$1:[@N°];[@N°])
=SOMMEPROD(N(SUPPRESPACE(C$1:[@Titre3])=""))
=SI(SUPPRESPACE([@Titre3])="";[@N°];[@N°]&"."&NB.SI(A$1:[@N°];[@N°])-1)