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.

Macro ocultar filas muy lenta

publicado

Amigos tengo la siguiente macro:

Sub Ocultar()

Dim r As Range

Application.ScreenUpdating = False

ActiveSheet.Unprotect

Rows("21:500").Select

Selection.EntireRow.Hidden = False

For Each r In Range("A21:A500")

If r = 1 Then r.EntireRow.Hidden = True

Next r

Application.ScreenUpdating = True

End Sub

He probado distintas formas para que queda mas rápida porque es demasiado lenta, he hecho por ejemplo ciclo for, la he separado en distintos rangos, he llamado con otra macro los distintos rangos, pero nada, nose como dejarla mas eficiente. ayuda amigos muchas gracias

Featured Replies

publicado

prueba colocando al inicio de la macro esto

Application.Calculation = xlCalculationManual

y luego al final esto

Application.Calculation = xlCalculationAutomatic

a ver si mejora

publicado

pudieras probar asi tambien

Sub Ocultar()
Dim r As Range
Dim rTodo As Range

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
ActiveSheet.Unprotect

Rows("21:500").Select
Selection.EntireRow.Hidden = False
For Each r In Range("A21:A500")
If r = 1 Then
If rTodo Is Nothing Then
Set rTodo = r
Else
Set rTodo = Union(rTodo, r)
End If
End If
Next r

rTodo.EntireRow.Hidden = True

Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub[/CODE]

publicado
  • Autor

Muchas gracias bigpretoman, me funciona de maravilla

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.