Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim i&
If Target.Count > 1 Then Exit Sub
If Intersect(Target, [D6:D26]) Is Nothing Then Exit Sub
With Application
For i = 6 To 26
Cells(i, 4) = _
Len(Replace(.Substitute(Cells(i, 3).Text, " ", ""), "-", "")) ' ex.: arc en ciel
Next i
End With
End Sub