vahapexcel
Altın Üye
- Katılım
- 27 Şubat 2009
- Mesajlar
- 59
- Excel Vers. ve Dili
- 2010 Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Ozet()
Dim dizi(), syf As Worksheet, j As Byte, i As Byte, son As Long, sat As Long
Application.ScreenUpdating = False
Sheets("Para").Select
Range("A2:C" & Rows.Count).Clear
Cells.RemoveSubtotal
dizi = Array("", "ABC", "A", "B", "C")
For j = 1 To 67 Step 6
For i = 1 To 4
Set syf = Sheets(dizi(i))
With syf
son = .Cells(Rows.Count, j).End(xlUp).Row
If son <> 3 Then
sat = Cells(Rows.Count, "B").End(xlUp).Row + 1
Range(Cells(sat, "A"), Cells(sat + son - 4, "A")) = Format(CDate("1." & .Cells(1, j)), "mmmm")
.Range(.Cells(4, j), .Cells(son, j + 1)).Copy Cells(sat, "B")
End If
End With
Next i
Next j
Range("A1:C" & sat).Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(3), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Columns("A:C").EntireColumn.AutoFit
Application.ScreenUpdating = True
End Sub
Ömer Bey Emeğiniz ve çabanız teşekkür ederim.
Bir değişiklik yapabilirmiyiz.
Biçimlendirme ile birlikte aktarım yapıyor.
mevcut hücre biçimlendirme ne ise olduğu şekilde muhafa edilmesi sadece değerlerin aktarılması mümkün mü?
değil ise çok sorun değil
Sub Ozet()
Dim dizi(), syf As Worksheet, j As Byte, i As Byte, son As Long, sat As Long
Application.ScreenUpdating = False
Sheets("Para").Select
Range("A2:C" & Rows.Count).Clear
Cells.RemoveSubtotal
dizi = Array("", "ABC", "A", "B", "C")
For j = 1 To 67 Step 6
For i = 1 To 4
Set syf = Sheets(dizi(i))
With syf
son = .Cells(Rows.Count, j).End(xlUp).Row
If son <> 3 Then
sat = Cells(Rows.Count, "B").End(xlUp).Row + 1
Range(Cells(sat, "A"), Cells(sat + son - 4, "A")) = Format(CDate("1." & .Cells(1, j)), "mmmm")
.Range(.Cells(4, j), .Cells(son, j + 1)).Copy
Cells(sat, "B").PasteSpecial xlPasteValues, xlNone
End If
End With
Next i
Next j
[COLOR=red] [/COLOR]
[COLOR=red] Range("A1:C" & sat).Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(3), _[/COLOR]
[COLOR=red] Replace:=True, PageBreaks:=False, SummaryBelowData:=True[/COLOR]
Columns("A:C").EntireColumn.AutoFit
Application.ScreenUpdating = True
End Sub