Red de conocimiento informático - Problemas con los teléfonos móviles - Programación VBA, subprograma EXCEL.

Programación VBA, subprograma EXCEL.

Supongo que volví a esta pregunta y le pedí más información.

ALT F11, inserte el módulo y luego agregue el siguiente código en el módulo.

Luego regresa a la hoja 1, agrega 2 Autoformas, haz clic derecho y asígnales las macros correspondientes.

Sub Extract()

t = InputBox("Ingrese lo que está buscando:")

y = 5

Range("a5:p65536").ClearContents

Con hojas("sheet2")

Para r = 1 a .[D65536].End(xlUp).Row

Si InStr(.Cells(r, 4), t) Entonces

.Cells(r, 1).Resize(1, 15).Copy Cells(y, 1)

Celdas(y, 16) = r

y = y 1

Terminar si

Siguiente

Terminar con

End Sub

Sub Restore()

Con Sheets("sheet2")

Para r = 5 a [P65536].End (xlUp).Row

Cells(r, 1).Resize(1, 15).Copy .Cells(Cells(r, 16).Value, 1)

Siguiente

Terminar con

Rango("a5:p65536").ClearContents