1903emre34@gmail.com
Altın Üye
- Katılım
- 29 Mayıs 2016
- Mesajlar
- 945
- Excel Vers. ve Dili
- Microsoft Excel 2013 Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Düğme1_Tıklat()
Application.DisplayAlerts = False
Set Sh1 = Sheets("Sayfa1")
If WorksheetExists("Sonuc") Then
Sheets("Sonuc").Delete
End If
Set Newsh = Sheets.Add(After:=Sheets(Sheets.Count))
Newsh.Name = "Sonuc"
Set shsonuc = Sheets("Sonuc")
Sh1.Range("A5:I5").Copy shsonuc.Range("A5")
sonsatir = Sh1.Cells(Rows.Count, "A").End(3).Row
satir = 5
For i = 6 To sonsatir
veri = Sh1.Cells(i, 1).Value
oncekiveri = Sh1.Cells(i - 1, 2).Value
If InStr(veri, "Ara toplam") > 0 Then
satir = satir + 1
For j = 1 To 9
shsonuc.Cells(satir, j) = Trim(Sh1.Cells(i, j))
If j > 4 Then shsonuc.Cells(satir, j) = shsonuc.Cells(satir, j) * 1
Next
shsonuc.Range("B" & satir).Value = Left(oncekiveri, 3)
shsonuc.Cells(satir, "G").Value = shsonuc.Cells(satir, "E").Value + shsonuc.Cells(satir, "G").Value
shsonuc.Cells(satir, "E").Value = 0
shsonuc.Cells(satir, "I").Value = Abs(shsonuc.Cells(satir, "G").Value - shsonuc.Cells(satir, "H").Value)
End If
Next i
shsonuc.Cells.Select
shsonuc.Cells.EntireColumn.AutoFit
shsonuc.Range("A1").Select
Application.DisplayAlerts = True
End Sub