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.

Desplazarse una fila sin caer en celdas ocultas

publicado

Hola, estoy trabajando en una macro que me filtre una tabla y que la pegue en otro libro, todo funciona correctamente salvo una parte.

A la tabla que deseo copia le pongo la opción de un autofiltro para que me seleccione solo una semana en particular, y tengo una validación para ello:

 

Sheets("DataIns").Select
 Worksheets("DataIns").AutoFilterMode = False
 Range("A1").Select
Selection.AutoFilter Field:=7, Criteria1:=wk
 Range("G1").Select
 ActiveCell.Offset(1, 0).Select

comproWeek = ActiveCell.Value

  If comproWeek = wk Then
 Range("B1").Select
 ActiveCell.Offset(1, 0).Select
 Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
 Selection.Copy
                     
  Else

Copiar = "No"
  End If

 

Al utilizar el offset para comprobar si es la celda con la semana correcta queda dentro de las ocultas y por tanto no se copia.

image.png.972ec61e2aa918fb52515de989bc00d7.png

Lo que necesito es que pueda desplazarse una fila y caer sobre el valor que corresponde para correr la condicional si debe copiarse o no...

image.png.0f56a925591a181642c56cb6a94b3c75.png

 

 

Featured Replies

publicado
  • Autor

Solucionado. 

Comparto por si alguien más lo necesita... Marcado de rojo la línea de código que coloque para que busque la siguiente fila no oculta

 Sheets("DataIns").Select
                     Worksheets("DataIns").AutoFilterMode = False
                     Range("A1").Select
                     Selection.AutoFilter Field:=7, Criteria1:=wk
                     Range("G1").Select
                     Set buscar = Range("G:G").Find(wk, LookIn:=xlValues, lookat:=xlWhole)
                     If Not buscar Is Nothing Then
                     With ActiveSheet.AutoFilter
        Set Rng = .Range.Resize(.Range.Rows.Count - 1).Offset(1, 0)
        Rng.SpecialCells(xlCellTypeVisible).Cells(1, 7).Select
    End With

    
                     fila = ActiveCell.Row
                     comproWeek = ActiveCell.Value
                     
                     If comproWeek = wk Then
                     
                     Range("B" & fila).Select
                     Range(Selection, Selection.End(xlDown)).Select
                     Range(Selection, Selection.End(xlToRight)).Select
                     Selection.Copy
                     
                     Else
                     
                     Copiar = "No"
                     End If
                     
                     If Copiar <> "No" Then

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.