Kod:
Sub DUSEYARA()
Set ahl = Sheets("AKTİF_HASTA_LİSTESİ")
Set f_2 = Sheets("FAALİYET 2")
f2son = f_2.Cells(Rows.Count, 1).End(3).Row
f_2.Range("C8:Q" & f2son).WrapText = True
f_2.Range("C8:Q" & f2son).ClearContents
For fsat = 8 To f2son
If f_2.Cells(fsat, "B") > 0 Then
f_2.Cells(fsat, "C") = Date
Set ahlno = ahl.[A:A].Find(f_2.Cells(fsat, "B"))
If Not ahlno Is Nothing Then
ahlsat = ahlno.Row
f_2.Cells(fsat, "J") = ahl.Cells(ahlsat, "Y")
f_2.Cells(fsat, "P") = ahl.Cells(ahlsat, "E")
f_2.Cells(fsat, "D") = ahl.Cells(ahlsat, "M")
'...ÜSTTEKİ SATIRI KOPYALAYIP, SÜTUN ADLARINI DEĞİŞTİREREK, HERBİR SÜTUN İÇİN BİR SATIR EKLENMİŞ OLSUN...'
End If
End If
Next
End Sub
yukarıdaki kod modüle yapıştırdığımda buton ile sorunsuz çalışıyor
yapmak istediğim bu kodu faaliyet 2 isimli sayfanın kod bölümüne yapıştırıp b sütununa veri yazıp çıktığımda kodun otomatik çalışarak verileri çekmesi.
