1Al2Ver
Altın Üye
- Katılım
- 5 Kasım 2007
- Mesajlar
- 4,727
- Excel Vers. ve Dili
- 64 Bit TR - Microsoft Office 365 - Win11 Home
- Altın Üyelik Bitiş Tarihi
- 04-01-2026
Merhaba,
Aşağıdaki kod son dolu satır olan 9 ncu satırdan sonraki ilk boş satıra yani 10 ncu satıra aktarma yapmaktadır,
s1.Cells(sat2 + 2, "g") = "=SUM(G10:G" & sat2 + 1 & ")"
bu komut G11:G aralığını toplamalı
Kodun 9 ncu satırdan sonra 2 nci boş olan 11 nci satıra aktarma yapmasını arzulamaktayım.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, [b:b]) Is Nothing Then Exit Sub
Set s1 = Sheets("satış")
Cancel = True
sat = Target.Row
Range("a" & sat & ":e" & sat).Interior.ColorIndex = 37
sat2 = s1.[a65536].End(3).Row + 1
s1.Rows(sat2).Insert
s1.Cells(sat2, "a") = sat2 - 9
s1.Cells(sat2, "b") = Cells(sat, "b")
s1.Cells(sat2, "c") = Cells(sat, "d")
s1.Cells(sat2, "d") = Cells(sat, "c")
s1.Cells(sat2, "f") = Cells(sat, "e")
s1.Cells(sat2 + 2, "g") = "=SUM(G10:G" & sat2 + 1 & ")"
End Sub
Teşekkür ederim.
Aşağıdaki kod son dolu satır olan 9 ncu satırdan sonraki ilk boş satıra yani 10 ncu satıra aktarma yapmaktadır,
s1.Cells(sat2 + 2, "g") = "=SUM(G10:G" & sat2 + 1 & ")"
bu komut G11:G aralığını toplamalı
Kodun 9 ncu satırdan sonra 2 nci boş olan 11 nci satıra aktarma yapmasını arzulamaktayım.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, [b:b]) Is Nothing Then Exit Sub
Set s1 = Sheets("satış")
Cancel = True
sat = Target.Row
Range("a" & sat & ":e" & sat).Interior.ColorIndex = 37
sat2 = s1.[a65536].End(3).Row + 1
s1.Rows(sat2).Insert
s1.Cells(sat2, "a") = sat2 - 9
s1.Cells(sat2, "b") = Cells(sat, "b")
s1.Cells(sat2, "c") = Cells(sat, "d")
s1.Cells(sat2, "d") = Cells(sat, "c")
s1.Cells(sat2, "f") = Cells(sat, "e")
s1.Cells(sat2 + 2, "g") = "=SUM(G10:G" & sat2 + 1 & ")"
End Sub
Teşekkür ederim.
Son düzenleme:
