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.

eliminar filas cuyos codigos ya existen en otra hoja

publicado

Buenos días, trataré de ser lo mas clara y concreta posible: Necesito una macro que me permita eliminar de la Hoja 2 todas las filas cuyos códigos ya existan en la Hoja 1[ATTACH]41559.vB[/ATTACH][ATTACH]41557.vB[/ATTACH] De verdad, muchas gracias.:culpability:

post-156511-145877008482_thumb.jpg

ELIMINAR FILAS.xls

Featured Replies

publicado

Hola Maria, una forma de hacerlo:

En C2 de la hoja 2 inserta esta formula: =CONTAR.SI(Hoja1!A$2:A$13;A2)

Doble clic para insertar la fomula hasta C6

Filtrar la columna C para mostrar solo la filas con numero >=1

Eliminar las filas

Eliminar el filtro

Puedes hacerlo con la grabadora de macros encendida y obtendras algo asi:

Sub Grabada()
ActiveCell.FormulaR1C1 = "=COUNTIF(Hoja1!R2C[-2]:R13C[-2],RC[-2])"
Range("C2").Select
Selection.AutoFill Destination:=Range("C2:C6")
Range("C2:C6").Select
Range("C1").Select
ActiveCell.FormulaR1C1 = "contar"
Range("C2").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$C$6").AutoFilter Field:=3, Criteria1:="1"
Range("A4:C6").Select
Selection.ClearContents
Selection.AutoFilter
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.EntireRow.Delete
Range("B11").Select
End Sub
Sub Depurada()
Range("C2:C6").FormulaR1C1 = "=COUNTIF(Hoja1!R2C[-2]:R13C[-2],RC[-2])"
ActiveSheet.Range("$A$1:$C$6").AutoFilter Field:=3, Criteria1:="1"
Range("A4:C6").Selection.ClearContents
Selection.AutoFilter
Range("A1:C6").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("B11").Select
End Sub[/CODE]

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.