Try this updated code
Option Explicit
Sub update_sheets()
Dim ws As Variant
Dim lrow As Long, i As Long, lastrow As Long
Dim sname As String
Application.ScreenUpdating = False
For i = 1 To Worksheets.Count
With Worksheets(i)
If .Name <> "Ingreso" And .Name <> "Egreso" And .Name <> "Tinterna" Then
lrow = .Range("A" & .Rows.Count).End(xlUp).Row
If lrow > 4 Then .Range("A5:G" & lrow).ClearContents
End If
End With
Next i
With Worksheets("Ingreso")
lrow = .Range("A" & .Rows.Count).End(xlUp).Row
For i = 5 To lrow
sname = .Range("C" & i).Value
lastrow = Worksheets("sname").Range("A" & Rows.Count).End(xlUp).Row
.Range("A" & i & ":B" & i).Copy Worksheets(sname).Range("A" & lastrow + 1)
.Range("D" & i).Copy Worksheets(sname).Range("D" & lastrow + 1)
Next i
lastrow = Worksheets("Balance").Range("A" & Rows.Count).End(xlUp).Row
.Range("A5:B" & lrow).Copy Worksheets("Balance").Range("A" & lastrow + 1)
.Range("D5:D" & lrow).Copy Worksheets("Balance").Range("D" & lastrow + 1)
End With
With Worksheets("Egreso")
lrow = .Range("A" & .Rows.Count).End(xlUp).Row
For i = 5 To lrow
sname = .Range("F" & i).Value
lastrow = Worksheets("sname").Range("A" & Rows.Count).End(xlUp).Row
.Range("A" & i & ":C" & i).Copy Worksheets(sname).Range("A" & lastrow + 1)
.Range("E" & i).Copy Worksheets(sname).Range("E" & lastrow + 1)
Next i
lastrow = Worksheets("Balance").Range("A" & Rows.Count).End(xlUp).Row
.Range("A5:C" & lrow).Copy Worksheets("Balance").Range("A" & lastrow + 1)
.Range("E5:E" & lrow).Copy Worksheets("Balance").Range("E" & lastrow + 1)
End With
With Worksheets("Tinterna")
lrow = .Range("A" & .Rows.Count).End(xlUp).Row
For i = 5 To lrow
sname = .Range("C" & i).Value
lastrow = Worksheets("sname").Range("A" & Rows.Count).End(xlUp).Row
.Range("A" & i & ":B" & i).Copy Worksheets(sname).Range("A" & lastrow + 1)
.Range("E" & i).Copy Worksheets(sname).Range("C" & lastrow + 1)
.Range("F" & i).Copy Worksheets(sname).Range("E" & lastrow + 1)
sname = .Range("D" & i).Value
lastrow = Worksheets("sname").Range("A" & Rows.Count).End(xlUp).Row
.Range("A" & i & ":B" & i).Copy Worksheets(sname).Range("A" & lastrow + 1)
.Range("E" & i).Copy Worksheets(sname).Range("C" & lastrow + 1)
.Range("F" & i).Copy Worksheets(sname).Range("D" & lastrow + 1)
Next i
End With
Application.ScreenUpdating = True
End Sub
Bookmarks