Bonjour !
Je n'ai pas l'habitude d'écrire sur les forums mais j'aime partager les débuts de solutions que je monte tant bien que mal :).
J'ai eu le même problème, c'est peut-être pas la meilleure solution mais voici mon code :
A mettre dans un module :
Sub test()
c = Selection.Row
d = Selection.Column
Range("E5:I5").Select
x = Selection.Columns.Count
Range("E5").Select
For y = 1 To x
a = Selection.Value
If a = Int(a) Then
Selection.Value = a
Else
b = Int(a)
If (a - b) > 0 Then
a = Int(a) + 1
Selection.Value = a
End If
End If
a = ""
ActiveCell.Offset(0, 1).Select
Next
Cells(c, d).Select
End Sub
A mettre dans "Feuil1" :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
Application.EnableEvents = False
If Not Intersect(Target, Range("A1:Z65536")) Is Nothing Then
Call test
End If
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub