XL 2016 selectionner troisieme ligne non masqué

treza88

XLDnaute Occasionnel
Bonjour a tous,

Quelqu'un pourrait il me dire comment sélectionner la quatrième cellule de la troisième ligne non masqué, j'ai fait le code suivant mais cela ne fonctionne pas.

Code:
Cells(3, 4).SpecialCells(xlVisible).Cells(1, 1).Select

Merci d'avance
 

Patrice33740

XLDnaute Impliqué
Bonjour,

Avec 2 boucles :
VB:
Sub xxx()
Dim i As Long
Dim rng As Range
 
  Set rng = Cells.SpecialCells(xlCellTypeVisible).Cells(1, 1)
  Do Until i = 4 - 1
    Set rng = rng.Offset(0, 1)
    If rng.EntireColumn.Hidden = False Then i = i + 1
  Loop
  i = 0
  Do Until i = 3 - 1
    Set rng = rng.Offset(1)
    If rng.EntireRow.Hidden = False Then i = i + 1
  Loop
  rng.Activate

End Sub
 

Discussions similaires

Réponses
5
Affichages
915