Here is the formula, oops!!
Sheets("Sheet2").Select
Range("A1").Select
Do Until ActiveCell = Empty
If ActiveCell = "Credit" Then 'case sensitive
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Cut
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Credit").Select
Application.Goto Reference:="R65536C1"
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Else
If ActiveCell = "Debit" Then 'case sensitive
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Cut
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Debit").Select
Application.Goto Reference:="R65536C1"
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Range("A1").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Else
ActiveCell.Offset(1, 0).Range("A1").Select
End If
End If
Loop
End Sub