1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Sub SuppColRng()
Dim i As Long, LastRow As Long, LastCol As Long
Application.ScreenUpdating = False
LastRow = Cells(2, 3).End(xlDown).Row
LastCol = Cells(2, 3).End(xlToRight).Column
'Suppression des lignes = 0
For i = LastRow To 2 Step -1
If Application.WorksheetFunction.Sum(Range(Cells(i, "D"), Cells(i, LastCol))) = 0 Then Rows(i).EntireRow.Delete
Cells(i, "B") = Application.WorksheetFunction.Sum(Range(Cells(i, "D"), Cells(i, LastCol)))
Next i
'Suppression des colonnes = 0
For i = LastCol To 5 Step -1
If Application.WorksheetFunction.Sum(Range(Cells(3, i), Cells(LastRow, i))) = 0 or Cells(1, i) = "AA" Then Columns(i).EntireColumn.Delete
'Cells(i,"A") = Application.WorksheetFunction.IFNA(INDEX(Portal!D:D;MATCH(D:$D;Portal!B:B;0));"")
Next i
Call HighlightMatches
Call Maj_A_From_Portal
End Sub |
Partager