DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, [C:E]) Is Nothing Then Exit Sub
If Target.Row < 2 Then Exit Sub
If Target.Column < 5 Then
Target = Format(Time, "hh:mm")
Else
Target = Format(Date, "dd.mm.yyyy")
End If
End Sub
Merhaba,
aşağıdaki kodları ilgili sayfanın kod bölümüne kopyalayınız. C ve D sütunlarında çift tıkladığınızda geçerli saati, E sütununda çift tıkladığınızda geçerli tarihi yazar.
Kod:Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, [C:E]) Is Nothing Then Exit Sub If Target.Row < 2 Then Exit Sub If Target.Column < 5 Then Target = Format(Time, "hh:mm") Else Target = Format(Date, "dd.mm.yyyy") End If End Sub
Kolay gelsin benimde bu konuyla ilgili bir kaç sorum olacaktı yeni bir başlık açmak istemedim.
Benim 1. yapmak istediğim B sütununa tarih ve C sütununa saat yazdımak.Tarih ve saat işlemi yaparken D veya E sütunundaki bir hücreye veri girişi yaptığımda B sütünundaki hücreye otomatik olarak o anki tarih ve C sütunundaki hücreyede otomatik olarak o anki saati bilgisayarın saatine bakarak yazması veri değişimi bile yapsam daha sonra bu 2 hücredeki tarih ve saatin değişmemesi.
2.Yapmak istediğim ise F sütunundaki hücreye aktif yazınca bir işlem yapılmaması pasif yazınca satırdaki yazının kalın ve arka planı kırmızı olması.
İlgi ve alakanız için teşekkür ederim iyi çalışmalar dilerim.Örnek dosya ektedir.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [d3:e50]) Is Nothing Then GoTo 10
Cells(Target.Row, "b") = Format(Date, "dd/mm/yyyy")
Cells(Target.Row, "c") = Format(Time, "hh:mm")
10:
If Intersect(Target, [f3:f50]) Is Nothing Then Exit Sub
If UCase(Target) = "PASİF" Or UCase(Target) = "PASIF" Then
Range(Cells(Target.Row, "a"), Cells(Target.Row, "f")).Select
With Selection
.Font.Bold = True
.Interior.Color = 255
End With
Target.Select
Else
Range(Cells(Target.Row, "a"), Cells(Target.Row, "f")).Select
With Selection
.Font.Bold = False
.Interior.Pattern = xlNone
End With
Target.Select
End If
End Sub
If Intersect(Target, [d3:e50]) Is Nothing Then GoTo 10
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [d3:e500]) Is Nothing Then GoTo 10
If Cells(Target.Row, "a") = "" Or Cells(Target.Row, "b") = "" Then
Cells(Target.Row, "b") = Format(Date, "dd/mm/yyyy")
Cells(Target.Row, "c") = Format(Time, "hh:mm")
End If
10:
If Intersect(Target, [f3:f500]) Is Nothing Then Exit Sub
If UCase(Target) = "PASİF" Or UCase(Target) = "PASIF" Then
Range(Cells(Target.Row, "a"), Cells(Target.Row, "f")).Select
With Selection
.Font.Bold = True
.Interior.Color = 255
End With
Target.Select
Else
Range(Cells(Target.Row, "a"), Cells(Target.Row, "f")).Select
With Selection
.Font.Bold = False
.Interior.Pattern = xlNone
End With
Target.Select
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [d3:e500]) Is Nothing Then GoTo 10
If Cells(Target.Row, "a") = "" Or Cells(Target.Row, "b") = "" Then
Cells(Target.Row, "b") = Format(Date, "dd/mm/yyyy")
Cells(Target.Row, "c") = Format(Time, "hh:mm")
End If
10:
If Intersect(Target, [f3:f500]) Is Nothing Then Exit Sub
If Cells(Target.Row, "f") = "" Then Exit Sub
If UCase(Target) = "PASİF" Or UCase(Target) = "PASIF" Then
Range(Cells(Target.Row, "a"), Cells(Target.Row, "f")).Select
With Selection
.Font.Bold = True
.Interior.Color = 255
End With
Target.Select
Else
Range(Cells(Target.Row, "a"), Cells(Target.Row, "f")).Select
With Selection
.Font.Bold = False
.Interior.Pattern = xlNone
End With
Target.Select
End If
End Sub