Kodlarda düzenleme yapılması hk.

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
 

Ekli dosyalar

YUSUF44

Destek Ekibi
Destek Ekibi
Katılım
4 Ocak 2006
Mesajlar
12,071
Excel Vers. ve Dili
İş : Ofis 365 - Türkçe
Ev: Ofis 365 - Türkçe
Önceki satırın sonunda alt çizgi var mı? Kodun tamamını paylaşırsanız daha iyi olur.
 

Haluk

Özel Üye
Katılım
7 Temmuz 2004
Mesajlar
12,406
Excel Vers. ve Dili
64 Bit 2010 - İngilizce
+
Google Sheets
+
JScript
Altın Üyelik Bitiş Tarihi
Kod:
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 Or hesap = 335 Or hesap = 190 Then

Ne yapmaya çalıştığınızı anlamadım ama, yazım hatası yukarıdaki gibi düzeltilir....

hesap = 890 bir sürü tekrar etmiş, ne amaçladığınızı anlamadım ...


.
 
Üst