1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| col1 = 2
Col2 = 4
col6 = 1
col3 = 1
col4 = 1
tampon = 1
tampon2 = 1
Windows("CustomerLabel.XLS").Activate
Cells(col1, Col2).Select
tampon = ActiveCell.Value
Windows("VGFrance.XLS").Activate
Dim objCell As Range, PremAdresse As String, PlageResult As Range
With Range("C2:C2000")
Set objCell = .Find(What:=tampon, After:=ActiveCell, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext)
If Not objCell Is Nothing Then
tampon2 = Selection.Find(What:=tampon, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End If
End With
If tampon2 Then
col3 = ActiveCell.Row
col4 = ActiveCell.Column
Range("D" & col3 & ":H" & col3).Select
Application.CutCopyMode = False
Selection.Copy
Windows("CustomerLabel.XLS").Activate
col6 = Col2 + 5
Range("I" & col1).Select
' Range("I1918").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End If |
Partager