hi, everyone
I want to change the following code to hide the port of text in one cell whit ";;;".
Can you help me??
thank you so much
I want to change the following code to hide the port of text in one cell whit ";;;".
Can you help me??
Private Sub Worksheet_Change(ByVal Target As Range)
Dim AOI As Range
Dim c As Range
Set AOI = Range("A1:A20")
If Not Intersect(Target, AOI) Is Nothing Then
Application.EnableEvents = False
For Each c In Intersect(Target, AOI)
With c
If .Text Like "####/##/##" Then
.Value = .Text
.Characters(1, 8).Font.Color = _
vbWhite
End If
End With
Next c
End If
Application.EnableEvents = True
End Sub
'Private Sub Worksheet_Change(ByVal Target As Range)
'If Target.Address = Range.Address Then
'For Each VariantValue In OtherRange
' If Range.Value = VariantValue Then
' Range.NumberFormat = ";;;"
' ' End If
' 'Next
'End If
'End Sub
Dim AOI As Range
Dim c As Range
Set AOI = Range("A1:A20")
If Not Intersect(Target, AOI) Is Nothing Then
Application.EnableEvents = False
For Each c In Intersect(Target, AOI)
With c
If .Text Like "####/##/##" Then
.Value = .Text
.Characters(1, 8).Font.Color = _
vbWhite
End If
End With
Next c
End If
Application.EnableEvents = True
End Sub
'Private Sub Worksheet_Change(ByVal Target As Range)
'If Target.Address = Range.Address Then
'For Each VariantValue In OtherRange
' If Range.Value = VariantValue Then
' Range.NumberFormat = ";;;"
' ' End If
' 'Next
'End If
'End Sub
thank you so much
Last edited: