Re : Localiser cellule suivant nombre de chiffres
Bonjour le forum, slt bhbh, pedrag31
Là je prend au serieux vos remarques et m'excuse pour tous le monde!
Une chose à ne pas refaire "içi et ailleur"
Merci pedrag31 pour ton aide precieuse, à vrais dire j'essai de rectifier les 2 derniere lignes de commande pour H4 et J3, j'ai essayé avec H4 mais ça marche pas! je n'est pas grandes connaissances en VBA:
Sub extraire()
Dim Z As String
Dim i As Byte
With Worksheets(1)
For i = 2 To Worksheets.Count
Z = Worksheets(i).Name
If Left(Z, 17) = "JUSTE" Then
.Cells(9 + i, 1) = Z
.Cells(9 + i, 2).Formula = "=" & Z & "!C6"
.Cells(9 + i, 3).Formula = "=" & Z & "!C7"
.Cells(9 + i, 4).Formula = "=" & Z & "!C8"
.Cells(9 + i, 5).Formula = "=" & Z & "!C9"
.Cells(9 + i, 6).Formula = "=" & Z & "!C10"
.Cells(9 + i, 7).Formula = "=" & Z & "!E11"
.Cells(9 + i, 8).Formula = "=" & Z & "!C11"
.Cells(9 + i, 9).Formula = "=" & Z & "!E12"
.Cells(9 + i, 10).Formula = "=" & Z & "!C12"
.Cells(9 + i, 11).Formula = "=" & Z & "!D13"
.Cells(9 + i, 12).Formula = "=" & Z & "!D13/1000"
.Cells(9 + i, 13).Formula = "=" & Z & "!A53"
.Cells(9 + i, 14).Formula = "=" & Z & "!A47"
.Cells(9 + i, 15).Formula = "=" & Z & "!A41"
.Cells(9 + i, 16).Formula = "=" & Z & "!A43"
.Cells(9 + i, 17).Formula = "=" & Z & "!A45"
.Cells(9 + i, 20).Formula = "=" & Z & "!A49"
ElseIf Left(Z, 17) <> "JUSTE" Then
.Cells(9 + i, 1) = Z
.Cells(9 + i, 22).Formula = "=" & Z & " =IF(OR(LEN(H4)=4, LEN(!H4)=5), "Importation OK", "Importation Incorrecte")
.Cells(9 + i, 23).Formula = "=" & Z & "!J3"
End If
Next i
End With
Merci beaucoup