(09/05/2021, 00:37)feraz yazdı: Merhaba.Kodu deneyiniz.
Sub kopyala()
Dim sonSut As Integer, tar As Range, son As Long
With Sheets("YILLIK_ÝCMAL")
sonSut = .Cells(1, Columns.Count).End(xlToLeft).Column
If sonSut < 2 Then Exit Sub
son = Sheets("ÝCMAL_2").Cells(Rows.Count, 1).End(3).Row
For Each tar In .Range(.Cells(1, 2), .Cells(1, sonSut))
If tar.Value = Year(Date) Then
Sheets("ÝCMAL_2").Range("A2:A" & son).Copy .Cells(2, 1)
Sheets("ÝCMAL_2").Range("F2:F" & son).Copy .Cells(2, tar.Column)
Exit For
End If
Next
End With
Application.CutCopyMode = False
Set tar = Nothing
MsgBox "Bitti"
End Sub
Zafer Hocam kafam karıştı.
Bu işlemi her yıl 15 Hazirandan sonra dosya ilk açıldığında 1 kere yapması gerekiyor.
Yine YILLIK_İCMAL Sayfasında 1. Satırlarda içinde bulunduğu yıl yoksa 1. satırdaki ilk boş satıra içinde bulunduğu yılı yazıp altına kopyalayıp tablo yapacak .