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.

error 91

publicado

La macro que estoy haciendo tiene dos listas en la columna a y otra en la columna b. con los nombres del rango de la columna "b", se van a crear unos libros con los nombres de esa columna, ese rango es nombrado como "sec_operativo". cuando se crea la hoja se va a copiar unas tablas dinamicas la cual se llena con informacion de los nombres de la columna "a", y tiene un nombre distinto, pero equivalente al de la columna b. es decir; cuando se crea el libro "san_pedro", en la tabla dinamica se debe filtrar colocando "58 - san pedro"

 

 image.thumb.png.9c88954753f4e058c1c09aa347704b33.png

deberia salir asi:

image.png.0ae3045e82e6f6ef461c9002f872e4a0.png

sale asi:

 

image.png.863760fef2c37bddc6f748d71a324331.png

 

 

y me sale este error

 

image.png.d5eb5b4f2c9fd36b7832057974f29431.png

 

esta es la macro:, lo que esta en amarillo es donde dice esta el error.

 

 

Dim rng As Range
Dim cell As Range
Dim fila As Integer
Dim secop As String


Set rng = Sheets("IMPRESION_SEC_OP").Range("SEC_OPERATIVO").Cells
For Each cell In rng
    If cell <> "" Then
        Sheets.Add.Name = cell
        ActiveWindow.DisplayGridlines = False
        
           
        Sheets("IMPRESION_SEC_OP").Range("I1:Q32").Copy
        ActiveSheet.Paste
        
      Range("a27").Select
          
      
     fila = rng.Find(what:=ActiveSheet.Name, lookat:=xlWhole, MatchCase:=False).Row
     secop = Sheets("IMPRESION_SEC_OP").Cells(fila, 1).Text
     
    ActiveSheet.PivotTables(2).PivotFields("SECTOROPERATIVO").ClearAllFilters
    ActiveSheet.PivotTables(2).PivotFields("SECTOROPERATIVO").CurrentPage = secop
             
           
    End If
Next cell

Featured Replies

publicado

No encuentra el dato, inténtalo así:

set celda = rng.Find(what:=ActiveSheet.Name, lookat:=xlWhole, MatchCase:=False)
if not celda is nothing then
  fila = celda.row
  secop = Sheets("IMPRESION_SEC_OP").Cells(fila, 1).Text
end if

 

publicado
  • Autor

 fila = rng.Find(what:=ActiveSheet.Name, LookIn:=xlValues, lookat:=xlWhole, MatchCase:=False).Row

 

solucionado.

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.