Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Columns("C:C")) Is Nothing Then
If Target.Offset(0, -1) = vbNullString Then Target.Offset(0, -2).ClearContents
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal T As Range)
If Not Intersect(T, Columns("C:C")) Is Nothing Then
T(1, -1) = Switch(T(1, 0) = "", "", T(1, 0) <> "", T(1, -1))
End If
End Sub
Bonsoir le fil, le forum
En se basant sur cette déclaration, ma vision de la chose pourrait être de passer par une procédure événementielle
NB: A mettre dans le code de la feuille (clic-droit sur l'onglet -> Visualiser le code)VB:Private Sub Worksheet_Change(ByVal T As Range) If T.Column = 2 Then If IsNumeric(T.Offset(, -1)) And Not IsEmpty(T.Offset(, -1)) Then T.Offset(, -1) = Application.Sum(T, T.Offset(, -1)) End If End If End Sub
Private Sub Worksheet_Change(ByVal R As Range)
If Intersect(R, Range([B2], [B65000].End(xlUp))) Is Nothing Then Exit Sub
Application.ScreenUpdating = 0
For Each R In R 'boucle pour une sélection multiple
If R = "" Then R(1, 0) = ""
Next
End Sub
Private Sub Worksheet_Change(ByVal R As Range)
If Intersect(R, Range([B2], [B65000].End(xlUp))) Is Nothing Then Exit Sub
Application.ScreenUpdating = 0
[A:B].AutoFilter 2, "": [A:A].SpecialCells(12) = "": [A:B].AutoFilter
End Sub
Private Sub Worksheet_SelectionChange(ByVal R As Range)
If Not Intersect(R, [C:C]) Is Nothing Then
Application.ScreenUpdating = 0
For Each C In R
If C(1, 0) = "" Then C(1, -1) = ""
Next
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal R As Range)
If Not Intersect(R, [C:C]) Is Nothing Then
Application.ScreenUpdating = 0
[A:B].AutoFilter 2, "": [A:A].SpecialCells(12) = "" [A:B].AutoFilter
End If
End Sub