Modifier un algo
Résolu
jack2125
Messages postés
484
Statut
Membre
-
ccm81 Messages postés 11033 Statut Membre -
ccm81 Messages postés 11033 Statut Membre -
Bonjour,
j'utilise c'est algo
il me demande la plage...
je voudrais l'imposer A2:J3000
est ce possible
j'utilise c'est algo
il me demande la plage...
je voudrais l'imposer A2:J3000
est ce possible
Option Explicit
Const coG = 7
Const coH = 8
Const coF = 6
Const lideb = 2
Const codeb = 1
Sub sup()
Dim li As Long, co As Long, lifin As Long, cofin As Long
Application.ScreenUpdating = False
lifin = Cells(Rows.Count, codeb).End(xlUp).Row
cofin = Cells(lideb, Columns.Count).End(xlToLeft).Column
' traitement colonne G
For li = lideb To lifin
If Cells(li, coG).Value = 0 Then
Range(Cells(li, codeb), Cells(li, cofin)).ClearContents
End If
Next li
' traitement colonne h
For li = lideb To lifin
If Cells(li, coH).Value = 0 Then
Range(Cells(li, codeb), Cells(li, cofin)).ClearContents
End If
Next li
' traitement colonne F
For li = lideb To lifin
If Cells(li, coF).Value <> "" Then
If Cells(li, coF).Value < 75 Or Cells(li, coF).Value > 175 Then
Range(Cells(li, codeb), Cells(li, cofin)).ClearContents
End If
End If
Next li
Dim p As Range, i As Long
Set p = Application.InputBox(Prompt:="Sélectionnez une plage", _
Title:=" Supprimer lignes vides", Type:=8)
With p
For i = .Rows.Count To 1 Step -1
If Application.CountA(.Rows(i)) = 0 Then _
.Rows(i).EntireRow.Delete 'ICI
Next i
End With
End Sub
Configuration: Windows / Edge 101.0.1210.47
A voir également:
- Modifier un algo
- Modifier dns - Guide
- Modifier liste déroulante excel - Guide
- Modifier story facebook - Guide
- Modifier l'extension d'un fichier - Guide
- Modifier un pdf gratuitement - Guide
5 réponses
merci de ta reponse
oui ça marche très bien mais je voudrais m'éviter de taper la plage et de l'intégrer en automatique
a2:j3000
oui ça marche très bien mais je voudrais m'éviter de taper la plage et de l'intégrer en automatique
a2:j3000
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
De rien
Si c'est fini, peux tu mettre le sujet à résolu (en haut à droite dans ton premier post)
tu pourrais en profiter pour supprimer ton message de ce matin 9h11 qui m'a l'air de faire doublon avec celui-ci
https://forums.commentcamarche.net/forum/affich-37596302-supression-de-ligne-vide-dans-tableau-excel
Bon après midi
Si c'est fini, peux tu mettre le sujet à résolu (en haut à droite dans ton premier post)
tu pourrais en profiter pour supprimer ton message de ce matin 9h11 qui m'a l'air de faire doublon avec celui-ci
https://forums.commentcamarche.net/forum/affich-37596302-supression-de-ligne-vide-dans-tableau-excel
Bon après midi