1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| Sub Cotation_Programme()
'Saisie du code GTI fournisseur
i = InputBox("Indiquez le code GTI fournisseur", "Code GTI", "")
'Indiquer le nom de la page de donnée
x = InputBox("Indiquez le nom de la page de donnée", "Nom Page", "")
'Copie les lignes correpondante sur la feuille de visualisation
Dim derlo As Long
derlo = Cells(65536, 3).End(xlUp).Row
Sheets.Add
ActiveSheet.Name = i
r = 1
For p = 1 To derlo
Sheets(x).Activate
If Cells(p, 5).Value = i Then
Rows(p).EntireRow.Copy
Sheets(i).Select
Range("A" & r).Select
ActiveSheet.Paste
r = r + 1
End If
p = p + 1
Next p
'Effacement données inutile sur feuille fournisseur
' Sheets(i).Select
'Dim derl As Long
'derl = Cells(65536, 5).End(xlUp).Row
'For f = 1 To derl
' If Cells(f, 8).Value = "." Then
' Rows(f).Select
' Selection.Delete Shift:=xlUp
' End If
' Next f
'For t = 1 To derl
' If Cells(t, 6).Value = "." Then
' Rows(t).Select
''' Selection.Delete Shift:=xlUp
' End If
' Next t
'For o = 1 To derl
'If Cells(o, 9).Value = "0" Then
' Rows(o).Select
' Selection.Delete Shift:=xlUp
' End If
' Next o
'For w = 1 To derl
'If Cells(w, 10).Value = "0" Then
' Rows(w).Select
' Selection.Delete Shift:=xlUp
' End If
' Next w
End Sub |
Partager