Option Explicit
Sub Tablo_NCV()
Dim lig As Byte
With F05
F04.Range("B6:U10").Copy
.Range("C6").PasteSpecial Paste:=xlPasteValues, Transpose:=True
.Range("H6:L25").FormulaR1C1 = "=1*OFFSET(Performances!R1C14,COLUMN()-6+(ROW()-6)*10,0,1,1)"
.Range("M6:Q25").FormulaR1C1 = "=OFFSET(Performances!R1C11,COLUMN()-11+(ROW()-6)*10,0,1,1)"
.Range("R6:V25").FormulaR1C1 = "=OFFSET(Performances!R1C15,COLUMN()-16+(ROW()-6)*10,0,1,1)"
.Range("W6:AA25").FormulaR1C1 = "=OFFSET(Performances!R1C10,COLUMN()-21+(ROW()-6)*10,0,1,1)"
With .Range("H6:AA25")
.Copy
.PasteSpecial xlPasteValues
End With
Application.CutCopyMode = False
.Range("A1").Activate
End With
Call Favoris
Call SYO5
Call LPT5
Call SYOLPT
For lig = 1 To 20
If Application.WorksheetFunction.Sum(Range("H5").Offset(lig).Resize(1, 20)) < 1 Then _
Range("H5").Offset(lig).Resize(1, 20).ClearContents
Next lig
End Sub
Sub Favoris()
Dim Colc As Byte, Colf As Byte, Col As Byte
Col = 6
Range("F27:V27").ClearContents
Do
For Colf = 6 To 11
If Application.WorksheetFunction.CountIf(Range("F27:V27"), Cells(Colf, "F")) = 0 Then
Cells(27, Col) = Cells(Colf, "F")
Col = Col + 1
Exit For
End If
Next Colf
For Colc = 6 To 11
If Application.WorksheetFunction.CountIf(Range("F27:V27"), Cells(Colc, "C")) = 0 Then
Cells(27, Col) = Cells(Colc, "C")
Col = Col + 1
Exit For
End If
Next Colc
Loop Until (Colc > 11 And Colf > 11)
End Sub
Sub SYO5()
Dim Colf As Byte
Range("F28:V28").ClearContents
For Colf = 12 To 22
If Cells(Colf, "G") >= 5 Then
Cells(28, Colf - 6) = Cells(Colf, "F")
End If
Next Colf
End Sub
Sub LPT5()
Dim Colc As Byte
Range("F29:V29").ClearContents
For Colc = 12 To 22
If Cells(Colc, "D") >= 5 Then
Cells(29, Colc - 6) = Cells(Colc, "C")
End If
Next Colc
End Sub
Sub SYOLPT()
Dim Colc As Byte, Colf As Byte, Col As Byte
Col = 6
Range("F30:V30").ClearContents
Do
For Colf = 12 To 25
If Application.WorksheetFunction.CountIf(Range("F30:V30"), Cells(Colf, "F")) = 0 And Cells(Colf, "G") >= 5 Then
Cells(30, Col) = Cells(Colf, "F")
Col = Col + 1
Exit For
End If
Next Colf
For Colc = 12 To 25
If Application.WorksheetFunction.CountIf(Range("F30:V30"), Cells(Colc, "C")) = 0 And Cells(Colc, "D") >= 5 Then
Cells(30, Col) = Cells(Colc, "C")
Col = Col + 1
Exit For
End If
Next Colc
Loop Until (Colc > 25 And Colf > 25)
End Sub