Bonsoir
en colonne AJ 1 ligne sur 4 liste validation par oui ou non
si "non" alors ligne et les 3 suivantes hidden
si "oui" alors ligne visible et 3 suivante hidden
Mais j'ai un message erreur
La méthode range de l'objet global à échoué
For i = 5 To 172 Step 4
If Range("AJ,i").Value = "non" Then
Rows("i").EntireRow.Hidden = True
Rows("i+1").EntireRow.Hidden = True
Rows("i+2").EntireRow.Hidden = True
Rows("i+3").EntireRow.Hidden = True
Else
Rows("i").EntireRow.Hidden = False
Rows("i+1").EntireRow.Hidden = True
Rows("i+2").EntireRow.Hidden = True
Rows("i+3").EntireRow.Hidden = True
Application.ScreenUpdating = True
End If
Next i
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Philippe.R
Bonjour, Ta variable i, incluse dans les double cotes, est donc lue comme du texte ; Range("aj" & i) collera mieux ; de même Rows(i) -- Avec plaisir http://dj.joss.free.fr/trombine.htm http://jacxl.free.fr/mpfe/trombino.html Philippe.R Pour se connecter au forum : http://www.excelabo.net/web/mpfe News://news.microsoft.com/microsoft.public.fr.excel "Lionel" a écrit dans le message de news:4aeda24e$0$949$
Bonsoir en colonne AJ 1 ligne sur 4 liste validation par oui ou non si "non" alors ligne et les 3 suivantes hidden si "oui" alors ligne visible et 3 suivante hidden
Mais j'ai un message erreur La méthode range de l'objet global à échoué
For i = 5 To 172 Step 4 If Range("AJ,i").Value = "non" Then Rows("i").EntireRow.Hidden = True Rows("i+1").EntireRow.Hidden = True Rows("i+2").EntireRow.Hidden = True Rows("i+3").EntireRow.Hidden = True Else Rows("i").EntireRow.Hidden = False Rows("i+1").EntireRow.Hidden = True Rows("i+2").EntireRow.Hidden = True Rows("i+3").EntireRow.Hidden = True Application.ScreenUpdating = True End If Next i
Merci pour votre aide et le temps passé...
Lionel
Bonjour,
Ta variable i, incluse dans les double cotes, est donc lue comme du texte ;
Range("aj" & i) collera mieux ; de même Rows(i)
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/web/mpfe
News://news.microsoft.com/microsoft.public.fr.excel
"Lionel" <liocanou@wanadoo.fr> a écrit dans le message de
news:4aeda24e$0$949$ba4acef3@news.orange.fr...
Bonsoir
en colonne AJ 1 ligne sur 4 liste validation par oui ou non
si "non" alors ligne et les 3 suivantes hidden
si "oui" alors ligne visible et 3 suivante hidden
Mais j'ai un message erreur
La méthode range de l'objet global à échoué
For i = 5 To 172 Step 4
If Range("AJ,i").Value = "non" Then
Rows("i").EntireRow.Hidden = True
Rows("i+1").EntireRow.Hidden = True
Rows("i+2").EntireRow.Hidden = True
Rows("i+3").EntireRow.Hidden = True
Else
Rows("i").EntireRow.Hidden = False
Rows("i+1").EntireRow.Hidden = True
Rows("i+2").EntireRow.Hidden = True
Rows("i+3").EntireRow.Hidden = True
Application.ScreenUpdating = True
End If
Next i
Bonjour, Ta variable i, incluse dans les double cotes, est donc lue comme du texte ; Range("aj" & i) collera mieux ; de même Rows(i) -- Avec plaisir http://dj.joss.free.fr/trombine.htm http://jacxl.free.fr/mpfe/trombino.html Philippe.R Pour se connecter au forum : http://www.excelabo.net/web/mpfe News://news.microsoft.com/microsoft.public.fr.excel "Lionel" a écrit dans le message de news:4aeda24e$0$949$
Bonsoir en colonne AJ 1 ligne sur 4 liste validation par oui ou non si "non" alors ligne et les 3 suivantes hidden si "oui" alors ligne visible et 3 suivante hidden
Mais j'ai un message erreur La méthode range de l'objet global à échoué
For i = 5 To 172 Step 4 If Range("AJ,i").Value = "non" Then Rows("i").EntireRow.Hidden = True Rows("i+1").EntireRow.Hidden = True Rows("i+2").EntireRow.Hidden = True Rows("i+3").EntireRow.Hidden = True Else Rows("i").EntireRow.Hidden = False Rows("i+1").EntireRow.Hidden = True Rows("i+2").EntireRow.Hidden = True Rows("i+3").EntireRow.Hidden = True Application.ScreenUpdating = True End If Next i
Merci pour votre aide et le temps passé...
Lionel
Lionel
Bonsoir et MERCI ca fonctionne!! Lionel "Philippe.R" <AS_rauphil_chez_wanadoo.fr> a écrit dans le message de news:
Bonjour, Ta variable i, incluse dans les double cotes, est donc lue comme du texte
;
Range("aj" & i) collera mieux ; de même Rows(i) -- Avec plaisir http://dj.joss.free.fr/trombine.htm http://jacxl.free.fr/mpfe/trombino.html Philippe.R Pour se connecter au forum : http://www.excelabo.net/web/mpfe News://news.microsoft.com/microsoft.public.fr.excel "Lionel" a écrit dans le message de news:4aeda24e$0$949$ > Bonsoir > en colonne AJ 1 ligne sur 4 liste validation par oui ou non > si "non" alors ligne et les 3 suivantes hidden > si "oui" alors ligne visible et 3 suivante hidden > > Mais j'ai un message erreur > La méthode range de l'objet global à échoué > > For i = 5 To 172 Step 4 > If Range("AJ,i").Value = "non" Then > Rows("i").EntireRow.Hidden = True > Rows("i+1").EntireRow.Hidden = True > Rows("i+2").EntireRow.Hidden = True > Rows("i+3").EntireRow.Hidden = True > Else > Rows("i").EntireRow.Hidden = False > Rows("i+1").EntireRow.Hidden = True > Rows("i+2").EntireRow.Hidden = True > Rows("i+3").EntireRow.Hidden = True > Application.ScreenUpdating = True > End If > Next i > > Merci pour votre aide et le temps passé... > > Lionel > >
Bonsoir et MERCI
ca fonctionne!!
Lionel
"Philippe.R" <AS_rauphil_chez_wanadoo.fr> a écrit dans le message de
news:OCUjvdwWKHA.844@TK2MSFTNGP05.phx.gbl...
Bonjour,
Ta variable i, incluse dans les double cotes, est donc lue comme du texte
;
Range("aj" & i) collera mieux ; de même Rows(i)
--
Avec plaisir
http://dj.joss.free.fr/trombine.htm
http://jacxl.free.fr/mpfe/trombino.html
Philippe.R
Pour se connecter au forum :
http://www.excelabo.net/web/mpfe
News://news.microsoft.com/microsoft.public.fr.excel
"Lionel" <liocanou@wanadoo.fr> a écrit dans le message de
news:4aeda24e$0$949$ba4acef3@news.orange.fr...
> Bonsoir
> en colonne AJ 1 ligne sur 4 liste validation par oui ou non
> si "non" alors ligne et les 3 suivantes hidden
> si "oui" alors ligne visible et 3 suivante hidden
>
> Mais j'ai un message erreur
> La méthode range de l'objet global à échoué
>
> For i = 5 To 172 Step 4
> If Range("AJ,i").Value = "non" Then
> Rows("i").EntireRow.Hidden = True
> Rows("i+1").EntireRow.Hidden = True
> Rows("i+2").EntireRow.Hidden = True
> Rows("i+3").EntireRow.Hidden = True
> Else
> Rows("i").EntireRow.Hidden = False
> Rows("i+1").EntireRow.Hidden = True
> Rows("i+2").EntireRow.Hidden = True
> Rows("i+3").EntireRow.Hidden = True
> Application.ScreenUpdating = True
> End If
> Next i
>
> Merci pour votre aide et le temps passé...
>
> Lionel
>
>
Bonsoir et MERCI ca fonctionne!! Lionel "Philippe.R" <AS_rauphil_chez_wanadoo.fr> a écrit dans le message de news:
Bonjour, Ta variable i, incluse dans les double cotes, est donc lue comme du texte
;
Range("aj" & i) collera mieux ; de même Rows(i) -- Avec plaisir http://dj.joss.free.fr/trombine.htm http://jacxl.free.fr/mpfe/trombino.html Philippe.R Pour se connecter au forum : http://www.excelabo.net/web/mpfe News://news.microsoft.com/microsoft.public.fr.excel "Lionel" a écrit dans le message de news:4aeda24e$0$949$ > Bonsoir > en colonne AJ 1 ligne sur 4 liste validation par oui ou non > si "non" alors ligne et les 3 suivantes hidden > si "oui" alors ligne visible et 3 suivante hidden > > Mais j'ai un message erreur > La méthode range de l'objet global à échoué > > For i = 5 To 172 Step 4 > If Range("AJ,i").Value = "non" Then > Rows("i").EntireRow.Hidden = True > Rows("i+1").EntireRow.Hidden = True > Rows("i+2").EntireRow.Hidden = True > Rows("i+3").EntireRow.Hidden = True > Else > Rows("i").EntireRow.Hidden = False > Rows("i+1").EntireRow.Hidden = True > Rows("i+2").EntireRow.Hidden = True > Rows("i+3").EntireRow.Hidden = True > Application.ScreenUpdating = True > End If > Next i > > Merci pour votre aide et le temps passé... > > Lionel > >