sablon hazırlama

kakara

Altın Üye
Katılım
5 Mart 2014
Mesajlar
252
Excel Vers. ve Dili
excel 2016 plus
Altın Üyelik Bitiş Tarihi
19-12-2025
merhaba ustadlar hergun defalarca yaptıgım bır ıs için sizlerin yardımını beklıyorum makro ıle halledebılırsek benım ıcın zaman acısından ınanılmaz faydası olucak ektekı dosyada nasıl bır sablon olmasını gerektıgını yazdım sımdıden ılgınız ıcın tesekkur ederım.
 

Ekli dosyalar

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,071
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Aslında makro kaydet yöntemiyle yapabilirdiniz. Ben de aşağıdaki kodları makro kaydetle elde ettikten sonra sadeleştirme ve biraz düzenleme yaptım. Ancak "sablonun alt kısmında mıktar ve dovızlı tutar kadar olması gerekıyor" kısmını anlamadım:

PHP:
Sub sablon()
    Application.ScreenUpdating = False
    Columns("I:AF").Delete Shift:=xlToLeft
    Columns("A:A").Copy [D1]
    Columns("C:C").Copy [A1]
    Columns("C:C").Delete Shift:=xlToLeft
    Application.CutCopyMode = False
    son = Cells(Rows.Count, "D").End(3).Row + 1
    Cells(son, "D").FormulaR1C1 = "=SUM(R[-22]C:R[-1]C)"
    Range("A1:G" & son).Borders(xlDiagonalDown).LineStyle = xlNone
    Range("A1:G" & son).Borders(xlDiagonalUp).LineStyle = xlNone
    With Range("A1:G" & son).Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Range("A1:G" & son).Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Range("A1:G" & son).Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Range("A1:G" & son).Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Range("A1:G" & son).Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Range("A1:G" & son).Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    Application.ScreenUpdating = True
    MsgBox "İşlem tamamlandı", vbInformation
End Sub
 

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,071
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Şu da daha kısaltılmış hali:

PHP:
Sub sablon1()
    Application.ScreenUpdating = False
    Columns("I:AF").Delete Shift:=xlToLeft
    Columns("A:A").Copy [D1]
    Columns("C:C").Copy [A1]
    Columns("C:C").Delete Shift:=xlToLeft
    Application.CutCopyMode = False
    son = Cells(Rows.Count, "D").End(3).Row + 1
    Cells(son, "D").FormulaR1C1 = "=SUM(R[-22]C:R[-1]C)"
    Range("A1:G" & son).Borders(xlDiagonalDown).LineStyle = xlNone
    Range("A1:G" & son).Borders(xlDiagonalUp).LineStyle = xlNone
    With Range("A1:G" & son).Borders()
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    Application.ScreenUpdating = True
    MsgBox "İşlem tamamlandı", vbInformation
End Sub
 

kakara

Altın Üye
Katılım
5 Mart 2014
Mesajlar
252
Excel Vers. ve Dili
excel 2016 plus
Altın Üyelik Bitiş Tarihi
19-12-2025
tesekkurler ustad makro kaydetle yapıyorum ama cerceve kısmını ve toplamları malesef alamıyordum (sureklı satır sayısı degısıyor) o yuzden yardım ıstedım sız adetı toplamıssınız ben dovızlı tutar kısmınıda toplatmak ıstıyorum acaba nasıl bır ekleme yapmam gerekıyor

Cells(son, "D").FormulaR1C1 = "=SUM(R[-22]C:R[-1]C)"

Cells(son, "G").FormulaR1C1 = "=SUM(R[-22]C:R[-1]C)"

yaptım oldu sanırım
 

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,071
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Toplama formülü yanlış olmuş, son satıra göre güncellenmesi gerekiyor, sabah düzeltmeye çalışırım.
 

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,071
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Günaydın. MAkronun son hali:

PHP:
Sub sablon1()
    Application.ScreenUpdating = False
    Columns("I:AF").Delete Shift:=xlToLeft
    Columns("A:A").Copy [D1]
    Columns("C:C").Copy [A1]
    Columns("C:C").Delete Shift:=xlToLeft
    Application.CutCopyMode = False
    son = Cells(Rows.Count, "D").End(3).Row + 1
    Cells(son, "D").Formula = "=SUM(D2:D" & son - 1 & ")"
    Cells(son, "G").Formula = "=SUM(G2:G" & son - 1 & ")"
    Range("A1:G" & son).Borders(xlDiagonalDown).LineStyle = xlNone
    Range("A1:G" & son).Borders(xlDiagonalUp).LineStyle = xlNone
    With Range("A1:G" & son).Borders()
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    Application.ScreenUpdating = True
    MsgBox "İşlem tamamlandı", vbInformation
End Sub
 

kakara

Altın Üye
Katılım
5 Mart 2014
Mesajlar
252
Excel Vers. ve Dili
excel 2016 plus
Altın Üyelik Bitiş Tarihi
19-12-2025
tesekkurler @YUSUF44 ustad bende farketmıstım kendım çözmeye calısıyordum bu arada kodda bır problem yok saolun
 
Üst