Sub FeuilGraph()
Dim Tablo1() As Variant, Tablo2() As Variant
Application.ScreenUpdating = False
With Sheets("sheet1")
x = 1
For i = 2 To .Range("A65000").End(xlUp).Row
If Weekday(.Cells(i, 1)) <> 0 And IsDate(.Cells(i, 1)) Then
If Format(.Cells(i, 1), "dd/mm/yy") <> Format(Cells(i + 1, 1), "dd/mm/yy") Then
ReDim Preserve Tablo1(1 To x)
Tablo1(x) = Format(.Cells(i, 1).Value, "dd/mm/yy")
x = x + 1
End If
End If
Next i
For j = 1 To UBound(Tablo1)
y = 1
For k = 2 To .Range("A65000").End(xlUp).Row
If Tablo1(j) = Format(.Cells(k, 1).Value, "dd/mm/yy") Then
ReDim Preserve Tablo2(1 To 2, 1 To y)
Tablo2(1, y) = Format(.Cells(k, 1).Value, "hh:mm")
Tablo2(2, y) = .Cells(k, 2).Value
y = y + 1
End If
Next k
Nom = Format(Tablo1(j), "dd-mm-yy")
Worksheets.Add after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = Nom
ActiveWindow.DisplayGridlines = False
For m = 1 To UBound(Tablo2, 2)
Cells(m, 1) = Tablo2(1, m)
Cells(m, 2) = Tablo2(2, m)
Next m
Set Graph = ActiveSheet.ChartObjects.Add(150, 20, 600, 300)
With Graph.Chart
.ChartType = xlColumnClustered
.SeriesCollection.NewSeries
.SeriesCollection(1).XValues = Range(Cells(1, 1), Cells(UBound(Tablo2, 2), 1))
.SeriesCollection(1).Values = Range(Cells(1, 2), Cells(UBound(Tablo2, 2), 2))
.HasTitle = True
.ChartTitle.Characters.Text = Nom
.HasLegend = False
.ChartArea.Border.LineStyle = 0
.ChartArea.Interior.ColorIndex = xlNone
.PlotArea.Border.LineStyle = xlNone
.PlotArea.Interior.ColorIndex = xlNone
.Axes(xlValue).MajorGridlines.Delete
End With
Next j
End With
Application.ScreenUpdating = True
End Sub