- Katılım
- 5 Eylül 2007
- Mesajlar
- 1,247
- Excel Vers. ve Dili
- ofis 2010
iyi akşamlar; borç ve alacaktaki eşit tutarları satır bazında siliniyor. birden fazla firmada aynı tutar olduğunda sorun yaşıyorum. Silme işleminde F v G hücresi yanında D hücresindeki firmanın da aynı olması sorunumu çözecektir. Kullandığım makro
Hayırlı akşamlar
Kod:
Sub SATIR_SIL()
Set wf = Application.WorksheetFunction
Application.DisplayAlerts = False
For sat = 2 To Cells(Rows.Count, 1).End(3).Row
If Cells(sat, "F") > 0 And wf.CountIf(Range("G:G"), Cells(sat, "F")) > 0 Then
gsat = wf.Match(Cells(sat, "F"), Range("G:G"), 0)
Range("A" & sat & ":J" & sat).Delete Shift:=xlUp
If sat < gsat Then gsat = gsat - 1
Range("A" & gsat & ":J" & gsat).Delete Shift:=xlUp
sat = sat - 1
End If
Next
Application.DisplayAlerts = True
End Sub
