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 COLUMNAS CON CRITERIO

publicado

Buenos días estimados amigos

necesito de su apoyo incondicional para este caso.

resulta que tengo una hoja con 900 columnas aprox.  De esa hoja quiero eliminar todas las columnas (a partir de la columna 3) que en la fila 2 no contenga  el texto "Chiclayo"

lo intento hacer de esta manera: pero no resulta

Dim COL As Integer
    COL = 2
    Do While Cells(3, COL) <> ""
         If Cells(2, COL).Value <> "*" & Chiclayo & "*" Then
                  Cells(3, COL).EntireRow.Delete
         COL = COL - 1
         End If
         COL = COL + 1
    Loop

Espero me puedan ayudar

 

Muchas gracias de Antemano

* No puedo subir archivo de prueba

 

 

Featured Replies

publicado
Sub EliminarColumnasNoChiclayo()
Application.ScreenUpdating = False
For y = Cells(2, Columns.Count).End(xlToLeft).Column To 3 Step -1
   If Not Cells(2, y) Like "*Chiclayo*" Then Columns(y).Delete
Next
End Sub

 

publicado
  • Autor

Muchas Gracias Antoni 

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.