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)
If Intersect(Target, [B:B]) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target = TimeSerial(Int(Target), 100 * (Target - Int(Target)), 0)
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [A:A]) Is Nothing Then Exit Sub
If IsNumeric(Target.Value) Then
Application.EnableEvents = False
Target.Value = TimeSerial(Int(Target.Value / 100), Target.Value Mod 100, 0)
Application.EnableEvents = True
End If
End Sub
Teşekkür ederim elinize sağlık. B:B yerine Bİlgili sütunun Biçimini Hücre Biçimlendirmeden "ss:dd" yapın
Sayfanın kod bölümüne aşağıdakini yapıştırın. Ben "B" sütunu için yazdım. Siz kendinize göre uyarlarsınız.
C++:Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, [B:B]) Is Nothing Then Exit Sub Application.EnableEvents = False Target = TimeSerial(Int(Target), 100 * (Target - Int(Target)), 0) Application.EnableEvents = True End Sub
B2 ye 12,55 yazınca 12:55 olarak düzeltir
B2 ye 12,65 yazınca 12:65 olamayacağı için 13:05 olarak düzeltir.
Umarım istediğiniz budur.
Merhaba,
Ben de bir şeyler karalamıştım. Ben de A sütunu için yazmıştım.
Kod:Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, [A:A]) Is Nothing Then Exit Sub If IsNumeric(Target.Value) Then Application.EnableEvents = False Target.Value = TimeSerial(Int(Target.Value / 100), Target.Value Mod 100, 0) Application.EnableEvents = True End If End Sub
Bende yapamadımSelamlar
Her iki kodu da denedim 1230 yazıyorum 00:00 çıkıyor
acaba 12:30 yazmayacak mı
nerede hata yaptım anlamadım
kodları tek tek denedim
ss:dd da yaptım ?
Hocam 3lü vardiya için eğer personel 23:00 giriş- 07:00 çıkış olacak şekilde yapmak istersek ne eklememiz gerekir? 00.00 ile 23.50 arası çalışıyor.Merhaba,
Ben de bir şeyler karalamıştım. Ben de A sütunu için yazmıştım.
Kod:Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, [A:A]) Is Nothing Then Exit Sub If IsNumeric(Target.Value) Then Application.EnableEvents = False Target.Value = TimeSerial(Int(Target.Value / 100), Target.Value Mod 100, 0) Application.EnableEvents = True End If End Sub
If Intersect(Target, [B3:B7,F6:I8,K9:M12]) Is Nothing Then Exit Sub
If Intersect(Target, Range("B3:B7,F6:I8,K9:M12")) Is Nothing Then Exit Sub