1903emre34@gmail.com
Altın Üye
- Katılım
- 29 Mayıs 2016
- Mesajlar
- 943
- Excel Vers. ve Dili
- Microsoft Excel 2013 Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_Change(ByVal Target As Range)
Dim bicim, s As String, t As Byte
If Intersect(Target, Range("B:B,D:D")) Is Nothing Then Exit Sub
With Target
If .Row < 2 Then Exit Sub
If .Count > 1 Then Exit Sub
If .Column = 4 Then
Cells(.Row, "F").NumberFormat = "General"
Cells(.Row, "G").NumberFormat = "General"
bicim = "00-00-0000"
If Len(.Value) < 5 Then bicim = "00-00"
If Len(.Value) < 7 And Len(.Value) > 4 Then bicim = "00-00-00"
If IsDate(Format(.Value, bicim)) = True Then
Application.EnableEvents = False
Cells(.Row, "F") = CDate(Format(.Value, bicim))
Cells(.Row, "G") = CDate(Format(.Value, bicim))
Application.EnableEvents = True
End If
End If
If .Column = 2 Then
t = InStr(.Value, "/")
If t = 0 Then
s = Replace(.Value, " ", "-")
.Value = s & "/" & s
End If
End If
End With
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim bicim, s As String, t As Byte
If Intersect(Target, Range("B:B,D:D")) Is Nothing Then Exit Sub
With Target
If .Row < 2 Then Exit Sub
If .Count > 1 Then Exit Sub
If .Column = 4 Then
Cells(.Row, "F").NumberFormat = "@"
Cells(.Row, "G").NumberFormat = "@"
bicim = "00-00-0000"
If Len(.Value) < 5 Then bicim = "00-00"
If Len(.Value) < 7 And Len(.Value) > 4 Then bicim = "00-00-00"
If IsDate(Format(.Value, bicim)) = True Then
Application.EnableEvents = False
Cells(.Row, "F") = Format(.Value, bicim)
Cells(.Row, "G") = Format(.Value, bicim)
Application.EnableEvents = True
End If
End If
If .Column = 2 Then
t = InStr(.Value, "/")
If t = 0 Then
s = Replace(.Value, " ", "-")
.Value = s & "/" & s
End If
End If
End With
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim bicim, s As String, t As Byte
If Intersect(Target, Range("B:B,D:D")) Is Nothing Then Exit Sub
With Target
If .Row < 2 Then Exit Sub
If .Count > 1 Then Exit Sub
If .Column = 4 Then
Cells(.Row, "F").NumberFormat = "@"
Cells(.Row, "G").NumberFormat = "@"
bicim = "00-00-0000"
If Len(.Value) < 5 Then bicim = "00-00"
If Len(.Value) < 7 And Len(.Value) > 4 Then bicim = "00-00-00"
If IsDate(Format(.Value, bicim)) = True Then
Application.EnableEvents = False
Cells(.Row, "F") = Format(.Value, bicim)
Cells(.Row, "G") = Format(.Value, bicim)
Cells(.Row, "D") = Format(.Value, bicim)
Application.EnableEvents = True
End If
End If
If .Column = 2 Then
t = InStr(.Value, "/")
If t = 0 Then
s = Replace(.Value, " ", "-")
.Value = s & "/" & s
End If
End If
End With
End Sub