Advertisement
gom

Untitled

gom
Jan 15th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim i As Integer
  2.     Dim nbT As Integer
  3.    
  4.         'tri sur colonne POI
  5.     Worksheets("OPX inter").Select
  6.     Rows("1:1").Select
  7.     Selection.AutoFilter
  8.     ActiveSheet.Range("$A$1:$L$65536").AutoFilter Field:=7, Criteria1:="<> "
  9.     Cells.Select
  10.     Application.CutCopyMode = False
  11.     Selection.Copy
  12.                 'Ajout d'une feuille "SIAT"
  13.     Sheets.Add After:=Sheets(Sheets.Count)
  14.     ActiveSheet.Name = "OPX"
  15.     Worksheets("OPX").Select
  16.     Range("A1").Select
  17.     ActiveSheet.Paste
  18.    
  19.         'tri sur colonne affect metier
  20.     Worksheets("OPX inter").Select
  21.     Worksheets("OPX inter").AutoFilterMode = False
  22.     Application.CutCopyMode = False
  23.     nbT = WorksheetFunction.CountA(Columns("A:A"))
  24.     For i = 1 To nbT
  25.         If Cells(i, 7).Value = "" Then
  26.             If Cells(i, 8).Value = "IPE*" Then
  27.                 Cells(i, 8).EntireRow.Copy
  28.                 Sheets("OPX").Select
  29.                 Range("A1").End(xlDown).Offset(1, 0).Select 'marche pas du tout à ce niveau là
  30.                 ActiveSheet.Paste
  31.             End If
  32.         End If
  33.     Next i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement