desesconder fila por fila

BLUEPOMME

New Member
Joined
Nov 15, 2018
Messages
22
como pongo el codigo vba para des-esconder fila por fila hasta llegar a fila 43 y empezando la 5 y después viceversa escondiendololas otra vez hasta llegar a la fila 5


gracias
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

igold

Well-known Member
Joined
Jul 8, 2014
Messages
2,471
Office Version
365, 2010
Platform
Windows
te ayuda esto

Code:
   'des-esconder
    ActiveSheet.Range("A5:A43").EntireRow.Hidden = False
    
    'escondiendo
    ActiveSheet.Range("A5:A43").EntireRow.Hidden = True
 

BLUEPOMME

New Member
Joined
Nov 15, 2018
Messages
22
gracias por la pronta respuesta

esto escondería el rango completo a la vez lo que busco es esconder o des esconderlas filas uno por uno , lo que tengo es :

Code:
Dim i As LongIf Columns("A").SpecialCells(xlCellTypeVisible).Count = Rows.Count Then Exit Sub
i = 1
Do Until Rows(i).Hidden = True
    i = i + 1
Loop
Rows(i).Hidden = False


'ActiveSheet.Protect
End Sub
lo que hace que aparezcan las filas uno por uno, pero necesito que pare en fila 43, como completeria mi código ,

y otro código que hace lo mismo pero viceversa o sea ocultar las filas nuevamente desde fila 43 uno por uno hasta llegar a fila 5


gracias
 
Last edited:

igold

Well-known Member
Joined
Jul 8, 2014
Messages
2,471
Office Version
365, 2010
Platform
Windows
Yo no hablo español. Estoy usando el traductor de Google. ¿Está esto más cerca de lo que quieres?

Code:
Sub unhide()
    Dim i As Long
    For i = 6 To 43
        Rows(i).Hidden = False
    Next
    'ActiveSheet.Protect
End Sub


Sub hide()
    Dim i As Long
    For i = 43 To 6 Step -1
        Rows(i).Hidden = True
    Next
    'ActiveSheet.Protect
End Sub
 

igold

Well-known Member
Joined
Jul 8, 2014
Messages
2,471
Office Version
365, 2010
Platform
Windows
De nada. Estaba feliz de ayudar. Gracias por la respuesta.
 

Forum statistics

Threads
1,089,557
Messages
5,408,947
Members
403,245
Latest member
Nanda Kishore

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top