Bonjour,
Pour visualiser les codes, il faut faire 'ALT+F11'.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer, msg As String
If Not Application.Intersect(Target, Range("D7:J7")) Is Nothing Then
If Application.CountIf(Range("D7:J7"), "=?") = 0 Then
[B7] = ""
Exit Sub
End If
On Error GoTo err_handler
Application.EnableEvents = False
For i = 4 To 10
If Cells(7, i) = "?" Then msg = msg & Lettre_Colonne(Cells(7, i)) & ", "
Next
msg = Left(msg, Len(msg) - 2)
[B7] = "Problème en : " & msg
Application.EnableEvents = True
End If
Exit Sub
err_handler:
Application.EnableEvents = True
End Sub
Public Function Lettre_Colonne(Cellule As Range) As String
Dim Col As Integer
Col = Cellule.Column
If Col > 1 Then
Lettre_Colonne = Left(Cellule.Address(False, False), _
Int(Log(Col - 1) / Log(26)) + 1)
Else
Lettre_Colonne = "A"
End If
End Function