Büyük bir veri grubunu excelde çevirmeye çalışıyorum ama beceremedim, özellikle tarih farkı konusunda sorunlar yaşıyorum
Excel dosyamı Access üzerinde açıp tarih farkı almak istedim onuda beceremedim
iki sütun arasındaki tarih farkını nasıl alabiliriz
Access kullanmaya yabancı birisi olarak soruyorum !!
Access ve Excel dosyası halinde yeniden ekledim
Kullandığım Excel kodu da
Kod:
Sub Anne_doğum_sat()
Set s1 = Worksheets("doğum"): Set s2 = Worksheets("tsh 2007"): Set s3 = Worksheets("sayfa1")
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
With s2.Range("C21:C208000")
For i = 12 To s1.[A11].End(xlDown).Row: değer = s1.Cells(i, "A"):
If değer = 0 Then GoTo Atla
Set c = .Find(değer, LookIn:=xlValues)
If Not c Is Nothing Then
firstaddress = c.Address
Do
'----------------------------------------------------------
If s1.Cells(i, "A") = s2.Cells(c.Row, "C") Then
Set it = s2.Cells(c.Row, "A"): Set st = s1.Cells(i, "H")
ilk = Format(it.Value, "dd.MM.yy hh:mm"): son = Format(st.Value, "dd.MM.yy hh:mm")
fark = son - ilk
s2.Cells(i, "AH").Value = fark
End If
'----------------------------------------------------------
Set c = .FindNext(c)
d = c.Address '''
Loop While Not c Is Nothing And c.Address <> firstaddress
'Else: GoTo çık:
'End If
End If
Atla:
Next i
End With
çık:
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub