Supprimer des lignes sous condition

Bonjour,

J'ai besoin de supprimer des lignes sous 2 conditions :

Si :

1- colonne I est égale à "MONOPRIX"

2- colonne P est égale à zéro "0"

Merci beaucoup par avance pour votre aide

Bien cordialement,

Bonjour

Un essai à tester. Te convient-il ?

Bye !

27essai-v1.xlsm (22.55 Ko)

Bonjour,

Merci beaucoup ça marche mais quand je veux l'intégrer dans mon fichier ça ne marche pas ...

Voici toute ma macro

Sub Macro1()

'

' Macro1 Macro

'

'

Rows("1:7").Select

Selection.Delete shift:=xlUp

ActiveWindow.ScrollColumn = 2

ActiveWindow.ScrollColumn = 4

ActiveWindow.ScrollColumn = 7

Columns("M:N").Select

Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _

SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _

ReplaceFormat:=False

Range("M7").Select

ActiveSheet.Range("$A$1:$T$7870").RemoveDuplicates Columns:=13, Header:= _

xlYes

Columns("R:R").Select

Selection.Replace What:="CT SIGNE", Replacement:="ODP SIGNE", LookAt:= _

xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _

ReplaceFormat:=False

Range("U1").Select

With Selection

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlBottom

.WrapText = True

.Orientation = 0

.AddIndent = False

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

ActiveCell.FormulaR1C1 = "ASSISTANTE"

Range("V1").Select

With Selection

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlBottom

.WrapText = True

.Orientation = 0

.AddIndent = False

.ShrinkToFit = False

.ReadingOrder = xlContext

.MergeCells = False

End With

ActiveCell.FormulaR1C1 = "DC"

Range("U2").Select

ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-15],tiers!C[-15]:C[-6],10,FALSE)"

Selection.AutoFill Destination:=Range("U2:U20000")

Range("U2:U20000").Select

Range("V2").Select

ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-16],tiers!C[-16]:C[-9],8,FALSE)"

Selection.AutoFill Destination:=Range("V2:V20000")

Range("V2:V20000").Select

Range("L1").Select

ActiveWindow.ScrollColumn = 8

ActiveWindow.ScrollColumn = 7

ActiveWindow.ScrollColumn = 6

ActiveWindow.ScrollColumn = 4

ActiveWindow.ScrollColumn = 3

ActiveWindow.ScrollColumn = 1

End Sub

-----------------------------------------------------------------------------------------------------

et je voulais integrer votre macro :

Dim i&

For i = Range("I" & Rows.Count).End(xlUp).Row To 1 Step -1

If Range("I" & i) = "MONOPRIX" And Range("P" & i) = 0 Then

Rows(i & ":" & i).Delete shift:=xlUp

End If

Next i

mais pourquoi ça ne marche pas

Merci par avance pour votre aide.

Cordialement

Au lieu de m'envoyer ta macro enregistrée, tu ferais mieux de m'envoyer ton fichier !

Bye !

Bonjour,

Le voici!

Merci!

11test-2.xlsm (34.81 Ko)

Bonjour

En retour.

Bye !

33test-v2.xlsm (39.09 Ko)

Super!!!! Mille merci!!

Très bonne journée

Cordialement

Rechercher des sujets similaires à "supprimer lignes condition"