Anexo la macro actualizada para funcionar con hojas protegidas
Private Sub Worksheet_Change(ByVal Target As Range)
'Por.Dante Amor
Set h1 = ActiveSheet
Set h2 = Sheets("TTE+MTJ")
Set h3 = Sheets("TTE")
Set h4 = Sheets("Sin Servicios")
'
If Not Intersect(Target, Columns("CW")) Is Nothing Then
'
fila = Target.Row
If Target.Count > 1 Then Exit Sub
If fila < 16 Then Exit Sub
If Cells(fila, "H") = "" Then Exit Sub
If Cells(fila, "H") = "TOTALES" Then Exit Sub
If Target.Value = "" Then Exit Sub
If h1.Cells(fila, "EY") = 1 Then Exit Sub
'
Application.ScreenUpdating = False
h1.Unprotect "qwer"
h2.Unprotect "qwer"
h3.Unprotect "qwer"
h4.Unprotect "qwer"
'copia a TTE
If Cells(fila, "AI") <> "" And Cells(fila, "BF") = "" Then
u = 16
Do While h3.Cells(u, "H") <> ""
u = u + 1
Loop
h1.Range("A" & Target.Row & ":DT" & fila).Copy h3.Range("A" & u)
h1.Cells(fila, "EY") = 1
End If
'copia a TTE+MTJ
If Cells(fila, "AI") <> "" And Cells(fila, "BF") <> "" Then
u = 16
Do While h2.Cells(u, "H") <> ""
u = u + 1
Loop
h1.Range("A" & Target.Row & ":EX" & fila).Copy h2.Range("A" & u)
h1.Cells(fila, "EY") = 1
End If
'copia a SinServicios
If Cells(fila, "AI") = "" And Cells(fila, "BF") = "" Then
u = 16
Do While h4.Cells(u, "H") <> ""
u = u + 1
Loop
h1.Range("A" & Target.Row & ":DT" & fila).Copy h4.Range("A" & u)
h1.Cells(fila, "EY") = 1
End If
h1.Protect "qwer", DrawingObjects:=True, Contents:=True, _
Scenarios:=True, AllowFormattingCells:=True
h2.Protect "qwer", DrawingObjects:=True, Contents:=True, _
Scenarios:=True, AllowFormattingCells:=True
h3.Protect "qwer", DrawingObjects:=True, Contents:=True, _
Scenarios:=True, AllowFormattingCells:=True
h4.Protect "qwer", DrawingObjects:=True, Contents:=True, _
Scenarios:=True, AllowFormattingCells:=True
Application.ScreenUpdating = True
End If
End Subsal u dos, r ecuerda cambiar la valoración a la respuesta.