İlgili alana veri gönderme ve hücre açıklaması ekletme.

Katılım
20 Eylül 2018
Mesajlar
132
Excel Vers. ve Dili
2016-Türkçe
Altın Üyelik Bitiş Tarihi
19-01-2023
Merhaba,
Mümkünse, ekteki excel dosyasında bulunan, DATAYI GÖNDER butonuna basıldığında,
Sistem izin alan kişiyi, Genel Takip Listesinde bulacak,
Kullandığı yıl ve ayı tespit edip aldığı izin gün sayısını yazacak,
Hücre açıklamasına da girilen izin başlangıç ve bitiş tarihlerini ekleyecek.
Yardımlarınızı rica ederim.
 

Ekli dosyalar

halit3

Uzman
Uzman
Katılım
18 Ocak 2008
Mesajlar
12,786
Excel Vers. ve Dili
2003 excell türkçe
ve
2007 excell türkçe
İzin formu sayfasındaki birleşmiş hücreleri ayırdım ekli dosyayı kontrol ediniz.
 

Ekli dosyalar

Katılım
20 Eylül 2018
Mesajlar
132
Excel Vers. ve Dili
2016-Türkçe
Altın Üyelik Bitiş Tarihi
19-01-2023
Halit Bey tekrar merhaba.
Peki bu çalışmada aynı personel aynı ay için 1'den fazla izin aldığı takdirde, önceki veri ile yeni veriyi toplatabilir miyiz?
Yani, Haziran ayında ilk önce 5 gün izin aldı. Yine aynı ay içerisinde bi 2 gün daha aldı. 5+2=7 deyip tarihlerini de açıklamaya ekletebilir miyiz?
 

halit3

Uzman
Uzman
Katılım
18 Ocak 2008
Mesajlar
12,786
Excel Vers. ve Dili
2003 excell türkçe
ve
2007 excell türkçe
kod:

Kod:
Private Sub CommandButton1_Click()

'ActiveSheet.Name
arana_kisi = Worksheets("İzin Formu").Cells(2, 2).Value

izin_bas = Worksheets("İzin Formu").Cells(3, 2).Value
izin_bit = Worksheets("İzin Formu").Cells(3, 4).Value

izin1 = Format(izin_bas, "mmmm.yyyy")
yıl = Format(Now, "yyyy")

Dim M As Date
For i = 3 To Worksheets("Genel Takip").Cells(Rows.Count, "a").End(3).Row
bulunan = Worksheets("Genel Takip").Cells(i, 1).Value

If arana_kisi = bulunan Then

For j = 2 To Worksheets("Genel Takip").Cells(2, Columns.Count).End(xlToLeft).Column
ay_ara = Worksheets("Genel Takip").Cells(2, j).Value & "." & yıl

If izin1 = ay_ara Then


If Val(Worksheets("Genel Takip").Cells(i, j).Value) > 0 Then

Worksheets("Genel Takip").Cells(i, j).Value = Worksheets("Genel Takip").Cells(i, j).Value + Worksheets("İzin Formu").Cells(4, 2).Value
deg = Worksheets("Genel Takip").Cells(i, j).Comment.Text

Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:=deg & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit " & izin_bit
Else
Worksheets("Genel Takip").Cells(i, j).Value = Worksheets("İzin Formu").Cells(4, 2).Value

Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:="İzin Formu:" & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit " & izin_bit
End If


End If
Next j

End If
Next i

End Sub
 
Katılım
20 Eylül 2018
Mesajlar
132
Excel Vers. ve Dili
2016-Türkçe
Altın Üyelik Bitiş Tarihi
19-01-2023
kod:

Kod:
Private Sub CommandButton1_Click()

'ActiveSheet.Name
arana_kisi = Worksheets("İzin Formu").Cells(2, 2).Value

izin_bas = Worksheets("İzin Formu").Cells(3, 2).Value
izin_bit = Worksheets("İzin Formu").Cells(3, 4).Value

izin1 = Format(izin_bas, "mmmm.yyyy")
yıl = Format(Now, "yyyy")

Dim M As Date
For i = 3 To Worksheets("Genel Takip").Cells(Rows.Count, "a").End(3).Row
bulunan = Worksheets("Genel Takip").Cells(i, 1).Value

If arana_kisi = bulunan Then

For j = 2 To Worksheets("Genel Takip").Cells(2, Columns.Count).End(xlToLeft).Column
ay_ara = Worksheets("Genel Takip").Cells(2, j).Value & "." & yıl

If izin1 = ay_ara Then


If Val(Worksheets("Genel Takip").Cells(i, j).Value) > 0 Then

Worksheets("Genel Takip").Cells(i, j).Value = Worksheets("Genel Takip").Cells(i, j).Value + Worksheets("İzin Formu").Cells(4, 2).Value
deg = Worksheets("Genel Takip").Cells(i, j).Comment.Text

Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:=deg & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit " & izin_bit
Else
Worksheets("Genel Takip").Cells(i, j).Value = Worksheets("İzin Formu").Cells(4, 2).Value

Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:="İzin Formu:" & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit " & izin_bit
End If


End If
Next j

End If
Next i

End Sub
Halit hocam,
Kodu denediğimde olmayan 2021 yılını dahi koysam istediğimi karşılıyor. Lakin listeye yeni isimler eklediğimde hataya düşüyor.
Onu da ekleyebilirseniz çok sevinirim.
 

halit3

Uzman
Uzman
Katılım
18 Ocak 2008
Mesajlar
12,786
Excel Vers. ve Dili
2003 excell türkçe
ve
2007 excell türkçe
Bu kodu bir dene

Kod:
Private Sub CommandButton1_Click()

arana_kisi = Worksheets("İzin Formu").Cells(2, 2).Value

izin_bas = Worksheets("İzin Formu").Cells(3, 2).Value
izin_bit = Worksheets("İzin Formu").Cells(3, 4).Value
izin1 = Format(izin_bas, "mmmm.yyyy")
yıl = Format(Now, "yyyy")

For i = 3 To Worksheets("Genel Takip").Cells(Rows.Count, "a").End(3).Row
bulunan = Worksheets("Genel Takip").Cells(i, 1).Value
say = 0
If arana_kisi = bulunan Then

For j = 2 To Worksheets("Genel Takip").Cells(2, Columns.Count).End(xlToLeft).Column
say = say + 1
If say = 13 Then
yıl = yıl + 1
say = 0
End If
ay_ara = Worksheets("Genel Takip").Cells(2, j).Value & "." & yıl

If izin1 = ay_ara Then

If Val(Worksheets("Genel Takip").Cells(i, j).Value) > 0 Then
deg = Worksheets("Genel Takip").Cells(i, j).Comment.Text
son = Val(UBound(Split(deg, Chr(10))))
Worksheets("Genel Takip").Cells(i, j).Value = Worksheets("Genel Takip").Cells(i, j).Value + Worksheets("İzin Formu").Cells(4, 2).Value
Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:=deg & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit   " & izin_bit

Worksheets("Genel Takip").Cells(i, j).Comment.Shape.ScaleHeight 2, msoFalse, msoScaleFromTopLeft

Else
Worksheets("Genel Takip").Cells(i, j).Value = Worksheets("İzin Formu").Cells(4, 2).Value

Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:="İzin Formu:" & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit   " & izin_bit
End If
'GoTo atla

End If
Next j

End If
'atla:
Next i

End Sub
 
Katılım
20 Eylül 2018
Mesajlar
132
Excel Vers. ve Dili
2016-Türkçe
Altın Üyelik Bitiş Tarihi
19-01-2023
Bu kodu bir dene

Kod:
Private Sub CommandButton1_Click()

arana_kisi = Worksheets("İzin Formu").Cells(2, 2).Value

izin_bas = Worksheets("İzin Formu").Cells(3, 2).Value
izin_bit = Worksheets("İzin Formu").Cells(3, 4).Value
izin1 = Format(izin_bas, "mmmm.yyyy")
yıl = Format(Now, "yyyy")

For i = 3 To Worksheets("Genel Takip").Cells(Rows.Count, "a").End(3).Row
bulunan = Worksheets("Genel Takip").Cells(i, 1).Value
say = 0
If arana_kisi = bulunan Then

For j = 2 To Worksheets("Genel Takip").Cells(2, Columns.Count).End(xlToLeft).Column
say = say + 1
If say = 13 Then
yıl = yıl + 1
say = 0
End If
ay_ara = Worksheets("Genel Takip").Cells(2, j).Value & "." & yıl

If izin1 = ay_ara Then

If Val(Worksheets("Genel Takip").Cells(i, j).Value) > 0 Then
deg = Worksheets("Genel Takip").Cells(i, j).Comment.Text
son = Val(UBound(Split(deg, Chr(10))))
Worksheets("Genel Takip").Cells(i, j).Value = Worksheets("Genel Takip").Cells(i, j).Value + Worksheets("İzin Formu").Cells(4, 2).Value
Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:=deg & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit   " & izin_bit

Worksheets("Genel Takip").Cells(i, j).Comment.Shape.ScaleHeight 2, msoFalse, msoScaleFromTopLeft

Else
Worksheets("Genel Takip").Cells(i, j).Value = Worksheets("İzin Formu").Cells(4, 2).Value

Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:="İzin Formu:" & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit   " & izin_bit
End If
'GoTo atla

End If
Next j

End If
'atla:
Next i

End Sub
Halit hocam,
Affınıza sığınarak dosyayı biraz değiştirdim.
Buna göre revize edebilirseniz çok sevinirim.
Yardımlarınızdan ötürü Allah bin kere razı olsun..
 
Son düzenleme:

halit3

Uzman
Uzman
Katılım
18 Ocak 2008
Mesajlar
12,786
Excel Vers. ve Dili
2003 excell türkçe
ve
2007 excell türkçe
Bu kodu İzin Formu_Yeni sayfasının kod bölümüne kopyala
kod:

Kod:
Private Sub CommandButton1_Click()

arana_kisi = Worksheets("İzin Formu_Yeni").Cells(10, 8).Value

izin_bas = Worksheets("İzin Formu_Yeni").Cells(14, 8).Value
izin_bit = Worksheets("İzin Formu_Yeni").Cells(14, 24).Value
izin1 = Format(izin_bas, "mmmm.yyyy")
'yıl = Format(Now, "yyyy")
yıl = Worksheets("Genel Takip").Cells(1, 15).Value

gun = Worksheets("İzin Formu_Yeni").Cells(15, 8).Value

For i = 3 To Worksheets("Genel Takip").Cells(Rows.Count, "a").End(3).Row
bulunan = Worksheets("Genel Takip").Cells(i, 3).Value
'say = 0
If arana_kisi = bulunan Then

For j = 15 To Worksheets("Genel Takip").Cells(2, Columns.Count).End(xlToLeft).Column
'say = say + 1

'If say = 13 Then
'yıl = yıl + 1
'say = 0
'End If

If Worksheets("Genel Takip").Cells(2, j).Value = "Ocak" Then
yıl = yıl + 1
End If

ay_ara = Worksheets("Genel Takip").Cells(2, j).Value & "." & yıl

If izin1 = ay_ara Then

If Val(Worksheets("Genel Takip").Cells(i, j).Value) > 0 Then
deg = Worksheets("Genel Takip").Cells(i, j).Comment.Text
son = Val(UBound(Split(deg, Chr(10))))
Worksheets("Genel Takip").Cells(i, j).Value = Worksheets("Genel Takip").Cells(i, j).Value + gun
Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:=deg & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit   " & izin_bit

Worksheets("Genel Takip").Cells(i, j).Comment.Shape.ScaleHeight 2, msoFalse, msoScaleFromTopLeft

Else
Worksheets("Genel Takip").Cells(i, j).Value = gun

Worksheets("Genel Takip").Cells(i, j).ClearComments
Worksheets("Genel Takip").Cells(i, j).AddComment
Worksheets("Genel Takip").Cells(i, j).Comment.Visible = False
Worksheets("Genel Takip").Cells(i, j).Comment.Text Text:="İzin Formu_Yeni:" & Chr(10) & "Bas " & izin_bas & Chr(10) & "Bit   " & izin_bit
End If

GoTo atla
End If
Next j
GoTo atla
End If
atla:
Next i
MsgBox "işlem tamam"
End Sub
 
Katılım
20 Eylül 2018
Mesajlar
132
Excel Vers. ve Dili
2016-Türkçe
Altın Üyelik Bitiş Tarihi
19-01-2023
Hocam çok teşekkür ederim.
Ellerinize sağlık..
 

halit3

Uzman
Uzman
Katılım
18 Ocak 2008
Mesajlar
12,786
Excel Vers. ve Dili
2003 excell türkçe
ve
2007 excell türkçe
Teşekkürler iyi çalışmalar
 
Üst