1903emre34@gmail.com
Altın Üye
- Katılım
- 29 Mayıs 2016
- Mesajlar
- 919
- Excel Vers. ve Dili
- Microsoft Excel 2013 Türkçe
- Altın Üyelik Bitiş Tarihi
- 06-06-2027
Merhaba,
Or hesap =890 or hesap =120 eklediğim zaman (Then önceki) resimdeki gibi hatayı alıyorum, nasıl düzeltmem lazım?
Sub Düğme2_Tıklat()
sonsatir = Cells(Rows.Count, "A").End(3).Row
buldu = False
For i = sonsatir To 1 Step -1
hesap = Cells(i, "C").Value
yevmiye = Cells(i, "B").Value
If i = sonsatir Then
eskiyevmiye = yevmiye
sayozel = 0
saynormal = 0
altsatir = i
End If
If yevmiye <> eskiyevmiye Then
If saynormal = 0 Then
For j = altsatir To i + 1 Step -1
Rows(j).Delete
Next j
altsatir = i
Else
altsatir = i
End If
i = i + 1
sayozel = 0
saynormal = 0
GoTo son
End If
If hesap = 800 Or hesap = 258 Or hesap = 102 Or hesap = 890 Or hesap = 102 Or hesap = 108 Or hesap = 800 Or hesap = 850 Or hesap = 120 Or hesap = 890 Or hesap = 150 Or hesap = 890 Or hesap = 126 Or hesap = 890 Or hesap = 153 Or hesap = 890 Or hesap = 127 Or hesap = 890 Or hesap = 890 Or hesap = 257 Or hesap = 890 Or hesap = 258 Or hesap = 890 Or hesap = 268 Or hesap = 255 Or hesap = 890 Or hesap = 890 Or hesap = 320 Or hesap = 102 Or hesap = 108 Or hesap = 128 Or hesap = 890 Or hesap = 129 Or hesap = 890 Or hesap = 135 Or hesap = 890 Or hesap = 159 Or hesap = 890 Or hesap = 180 Or hesap = 890 Or hesap = 191 Or hesap = 890 Or hesap = 193 Or hesap = 890 Or hesap = 195 Or hesap = 890 Or hesap = 251 Or hesap = 890 Or hesap = 253 Or hesap = 890 Or hesap = 102 Or hesap = 889 Or hesap = 181 Or hesap = 890 Or hesap = 190 Or hesap = 890 Or hesap = 254 Or hesap = 890 Or hesap = 259 Or hesap = 890 Or hesap = 251 Or hesap = 258 Or hesap = 303 Or hesap = 890 Or hesap = 335 Or hesap = 890 Then
sayozel = sayozel + 1
Else
saynormal = saynormal + 1
End If
son:
eskiyevmiye = yevmiye
Next i
UserForm1.Show
Application.Calculation = xlCalculationManual: Application.ScreenUpdating = False
Application.Calculation = xlCalculationAutomatic: Application.ScreenUpdating = True
MsgBox "..........", vbInformation, "..:: ::.."
End Sub
Or hesap =890 or hesap =120 eklediğim zaman (Then önceki) resimdeki gibi hatayı alıyorum, nasıl düzeltmem lazım?
Sub Düğme2_Tıklat()
sonsatir = Cells(Rows.Count, "A").End(3).Row
buldu = False
For i = sonsatir To 1 Step -1
hesap = Cells(i, "C").Value
yevmiye = Cells(i, "B").Value
If i = sonsatir Then
eskiyevmiye = yevmiye
sayozel = 0
saynormal = 0
altsatir = i
End If
If yevmiye <> eskiyevmiye Then
If saynormal = 0 Then
For j = altsatir To i + 1 Step -1
Rows(j).Delete
Next j
altsatir = i
Else
altsatir = i
End If
i = i + 1
sayozel = 0
saynormal = 0
GoTo son
End If
If hesap = 800 Or hesap = 258 Or hesap = 102 Or hesap = 890 Or hesap = 102 Or hesap = 108 Or hesap = 800 Or hesap = 850 Or hesap = 120 Or hesap = 890 Or hesap = 150 Or hesap = 890 Or hesap = 126 Or hesap = 890 Or hesap = 153 Or hesap = 890 Or hesap = 127 Or hesap = 890 Or hesap = 890 Or hesap = 257 Or hesap = 890 Or hesap = 258 Or hesap = 890 Or hesap = 268 Or hesap = 255 Or hesap = 890 Or hesap = 890 Or hesap = 320 Or hesap = 102 Or hesap = 108 Or hesap = 128 Or hesap = 890 Or hesap = 129 Or hesap = 890 Or hesap = 135 Or hesap = 890 Or hesap = 159 Or hesap = 890 Or hesap = 180 Or hesap = 890 Or hesap = 191 Or hesap = 890 Or hesap = 193 Or hesap = 890 Or hesap = 195 Or hesap = 890 Or hesap = 251 Or hesap = 890 Or hesap = 253 Or hesap = 890 Or hesap = 102 Or hesap = 889 Or hesap = 181 Or hesap = 890 Or hesap = 190 Or hesap = 890 Or hesap = 254 Or hesap = 890 Or hesap = 259 Or hesap = 890 Or hesap = 251 Or hesap = 258 Or hesap = 303 Or hesap = 890 Or hesap = 335 Or hesap = 890 Then
sayozel = sayozel + 1
Else
saynormal = saynormal + 1
End If
son:
eskiyevmiye = yevmiye
Next i
UserForm1.Show
Application.Calculation = xlCalculationManual: Application.ScreenUpdating = False
Application.Calculation = xlCalculationAutomatic: Application.ScreenUpdating = True
MsgBox "..........", vbInformation, "..:: ::.."
End Sub
Ekli dosyalar
-
34.6 KB Görüntüleme: 6