Bon, j'ai essayer de combiner ma macro avec celle de belkacem mais j'ai toujours une erreur avec les if et les Next à la fin
Je pense que je ne maitrise pas la fin de ma macro
Sub POURCENTAGE()
Dim My_Sheet As Worksheet, _
Sh As Worksheet, _
LastCol As Long, _
I As Long, _
J As Long, _
My_Val As Long
'--------------------------------------------------------------------------------
Set My_Sheet = Sheets("DONNEES")
Application.ScreenUpdating = False
My_Sheet.Range("B6:AF7").ClearContents
'--------------------------------------------------------------------------------
For Each Sh In ThisWorkbook.Worksheets
If Sh.Name <> "DONNEES" Then
With Sh
MyDate = .Range("A5").Value2
LastCol = My_Sheet.Cells(5, Columns.Count).End(xlToLeft).Column
For I = 2 To LastCol
If My_Sheet.Cells(5, I).Value2 = MyDate Then
'-------------------------------------------------------------------------------
For J = 4 To Range("A" & Rows.Count).End(xlUp).Row
If UCase(Range("A" & J)) = "PRIX" Then
My_Val = .Range("B" & J)
My_Sheet.Cells(6, I) = .Range("A5").Offset(4, 1)
My_Sheet.Cells(7, I) = My_Val
End If
Next J
Next I
End With
End If
Next Sh
Application.ScreenUpdating = True
End Sub