Consulta de macro para ordenar
Me podrías dar una mano, con una macro que me pasaste el otro día.
Que la misma no sea automática cuando cambie algo en la columna 4, sino que cambie al tocar un botón o al hacer una llamada de la misma.
Aquí abajo te detallo la macro que me armaste
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
Application.ScreenUpdating = False
With Range("A2:G" & ActiveSheet.UsedRange.Rows(ActiveSheet.UsedRange.Rows.Count).Row)
.Sort Key1:=.Cells(1, 4), Order1:=xlDescending, Header:=xlYes
End With
'
Set b = Columns("D").Find("SI", lookat:=xlWhole, SearchDirection:=xlPrevious)
If Not b Is Nothing Then f1 = b.Row
Set b = Columns("D").Find("OK", lookat:=xlWhole, SearchDirection:=xlPrevious)
If Not b Is Nothing Then f2 = b.Row
f = WorksheetFunction.Max(f1, f2)
'
Range("A2:G" & f).Sort Key1:=Range("F3"), Order1:=xlAscending
ThisWorkbook.RefreshAll
End If
End Sub
Respuesta de Dante Amor
1