Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

busqueda en varias columnas

publicado

buenas tardes como puedo modificar esta macro para que busque en varias columnas y copie las filas que contenga el dato buscado

  Sub copiar_y_borrar()
columna = Range("bz1").End(xlToLeft).Column
quebusco = InputBox("que dato quieres buscar")
If quebusco = "" Then Exit Sub
ActiveSheet.Range("a1").CurrentRegion.Sort key1:=Range("a1"), order1:=xlAscending, Header:=xlYes, ordercustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Set busca = ActiveSheet.Range("a2:a" & Range("a10000").End(xlUp).Row).Find(quebusco, LookIn:=xlValues, lookat:=xlWhole)
If Not busca Is Nothing Then
ubica = busca.Address
Range(ubica).Select
valor = ActiveCell.Value
fila = ActiveCell.Row
contarsi = Application.WorksheetFunction.CountIf(Columns(1), valor)
Range(Cells(fila, 1), Cells(fila + contarsi - 1, columna)).Copy
Sheets("copiados").Select
Cells(Range("copiados!a10000").End(xlUp).Row + 1, 1).PasteSpecial Paste:=xlValues
Do While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell. Value = "******************"

Sheets("hoja1").Select
Range(Cells(fila, 1), Cells(fila + contarsi - 1, columna)).EntireRow.Delete
Application.CutCopyMode = False
End If
End Sub

 

gracias 

Featured Replies

No hay posts para mostrar

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.