1 2 3 4 5 6 7 8 9 10
| Sub test()
dernligne = Range("A" & Rows.Count).End(xlUp).Row
For col = 3 To Cells(1, Cells.Columns.Count).End(xlToLeft).Column
Cells(Rows.Count, col).End(xlUp).Offset(1, 0) = Application.Average(Range(Cells(2, col), Cells(dernligne, col)))
Cells(Rows.Count, col).End(xlUp).Offset(1, 0) = Application.StDev(Range(Cells(2, col), Cells(dernligne, col)))
For Each cel In Range(Cells(2, col), Cells(derligne, col)).Cells
If cel.Value > Cells(Rows.Count, col).End(xlUp).Offset(-1, 0).Value Then cel.Interior.ColorIndex = 3
Next
Next
End Sub |
Partager