R
Raphael
Guest
Hello, hello,
Un malheur n'arrivant jamais seul, voilà le nouveau problème auquel je dois faire face:
Impossible de combiner ces 2 procédures (If... AND...). J'en fais appel à vos sagaces neurones!
Sub Stock()
Set Ref = Sheets("Macros").Range("PERIODE")
Sheets("Statistiques Dmd").Range("D212000").Select
For Row = 2 To 12000
Set TheCell = Range("D2").Offset(Row + 1, 0)
If Ref.Value = TheCell.Value Then
Sheets("Statistiques Dmd").Range("B2").Select
selection.Copy
TheCell.Offset(0, 2).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Exit For
End If
Next Row: End Sub
Sub Stock_2()
Set Ref2 = Sheets("Macros").Range("F2")
Sheets("Statistiques Dmd").Range("E2:E12000").Select
For Row = 2 To 12000
Set TheCell2 = Range("E2").Offset(Row + 1, 0)
If Ref2.Value = TheCell2.Value Then
Sheets("Statistiques Dmd").Range("B2").Select
selection.Copy
TheCell.Offset(0, 2).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Exit For
End If
End Sub
Merci d'avance (et merci pour votre aide à chaque fois)
Un malheur n'arrivant jamais seul, voilà le nouveau problème auquel je dois faire face:
Impossible de combiner ces 2 procédures (If... AND...). J'en fais appel à vos sagaces neurones!
Sub Stock()
Set Ref = Sheets("Macros").Range("PERIODE")
Sheets("Statistiques Dmd").Range("D212000").Select
For Row = 2 To 12000
Set TheCell = Range("D2").Offset(Row + 1, 0)
If Ref.Value = TheCell.Value Then
Sheets("Statistiques Dmd").Range("B2").Select
selection.Copy
TheCell.Offset(0, 2).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Exit For
End If
Next Row: End Sub
Sub Stock_2()
Set Ref2 = Sheets("Macros").Range("F2")
Sheets("Statistiques Dmd").Range("E2:E12000").Select
For Row = 2 To 12000
Set TheCell2 = Range("E2").Offset(Row + 1, 0)
If Ref2.Value = TheCell2.Value Then
Sheets("Statistiques Dmd").Range("B2").Select
selection.Copy
TheCell.Offset(0, 2).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Exit For
End If
End Sub
Merci d'avance (et merci pour votre aide à chaque fois)