try this
Sub deletecreditdebit()
'On Error Resume Next'probably not needed
For i = Cells(Rows.Count, "g").End(xlUp).Row To 2 Step -1
If Cells(i + 1, "g").Value = Cells(i, "g").Value _
And -Cells(i + 1, "j") = Cells(i, "j") _
And IsNumeric(Cells(i, "j")) Then
Rows(i & ":" & i + 1).delete 'Select
'MsgBox Cells(i, "g")
End If
Next i
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"K" <(E-Mail Removed)> wrote in message
news:a0dd66d6-5a13-4343-9452-(E-Mail Removed)...
> Hi, i have data in my spreadsheet from coloumn "A" to coloumn "L" . In
> coloumn "G" i have codes and in coloumn "J" i have debit and credit
> figures. I want macro which should look into coloumn "G" and coloumn
> "J" cells and if there are debit and credit figures in coloumn "J"
> cells which relates to same code which is in coloumn "G" cells then
> Macro should delete those both rows of debit and credit figures from
> Range("A:L")
> FOR EXAMPLE:
>
> G J ---------coloumns
> 15SS -100
> 15SS 100
> 15SS 200
> JK44 300
> JK44 -300
> JK44 400
>
> Macro should delete 4 rows from above data which will be 15SS -100 and
> 15SS 100 then also JK44 300 and JK44 -300. i want macro to delete row
> from Range("A:L").
> Please can anybody help