- Katılım
- 18 Ocak 2008
- Mesajlar
- 12,878
- Excel Vers. ve Dili
- 2003 excell türkçe
ve
2007 excell türkçe
Bu kod da farklı
Kod:
Sub Makro1()
With Application
.ScreenUpdating = False
.EnableEvents = False
.DisplayAlerts = False
.Calculation = xlManual
End With
ZBasla = TimeValue(Now)
zaman = Timer
sut1 = "a" 'başlangıç sutün
sut4 = "L" 'yardımcı sutün
sat1 = 7 'başlangıç satır
aranan = "2000000"
Set sh1 = Sheets(ActiveSheet.Name) 'sayfa adı
son = sh1.Cells(Rows.Count, sut1).End(3).Row 'son dolu satır
'veri2 = "hhhhhhhhhhhh"
For j = sat1 To son
If sh1.Cells(j, "c").Value = "KAYNAK GRUBU" Then
If Val(sh1.Cells(j, sut1).Value) <= 0 Then
sh1.Cells(j, sut1).Value = 123456789012#
End If
End If
If Val(sh1.Cells(j, sut1).Value) > 0 Then
veri1 = sh1.Cells(j, sut1)
veri2 = veri1
End If
sh1.Cells(j, sut4).Value = veri2
Next j
For j = son To sat1 Step -1
If Left(sh1.Cells(j, sut4).Value, Len(aranan)) <> aranan Then
Rows(j).Delete Shift:=xlUp
End If
Next j
MsgBox "İşleminiz tamamlanmıştır." & Chr(10) & _
"İşlem süresi ; " & Format(Timer - zaman, "0.00") & Chr(10) & _
"Geçen Süre " & CDate(zBitis - ZBasla), vbInformation, " Sonuç Penceresi"
With Application
.ScreenUpdating = True
.EnableEvents = True
.DisplayAlerts = True
.Calculation = xlAutomatic
End With
End Sub
