Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect([B11:B880], Target) Is Nothing Then Target.Value = IIf(Selection.NumberFormat = "0.000", "# ??/??", "0.000")
Cancel = True
End Sub
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = "$T$1" Then
Target.NumberFormat = Switch(Target.NumberFormat = "# ?/?", "#,##0.00", _
Target.NumberFormat = "#,##0.00", "# ?/?")
Cancel = True
End If
End Sub
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("A1:A50")) Is Nothing Then
Target.NumberFormat = Switch(Target.NumberFormat = "# ?/?", "#,##0.00", _
Target.NumberFormat = "#,##0.00", "# ?/?")
Cancel = True
End If
End Sub