Option Explicit
Const TheFullPathSource As String = 'C:\Documents and Settings\Te\My Documents\toto.xls' 'A ADAPTER !!!'
Sub RecupData()
Dim WBSource As Workbook, WBCible As Workbook
Dim WSSource As Worksheet, WSCible As Worksheet
Dim PlageSource As Range, CellSource As Range, CellCible As Range
Dim CellCibleRow As Long
Dim Bad As Boolean
Set WBSource = Workbooks.Open(TheFullPathSource)
Set WSSource = WBSource.Worksheets('Sheet1')
Set WBCible = ThisWorkbook
Set WSCible = WBCible.Worksheets('Sheet1')
With WSSource
Set PlageSource = .Range('A2', .Range('A65536').End(xlUp))
End With
For Each CellSource In PlageSource
If IsNumeric(CellSource) Then
If CellSource - CInt(CellSource) = 0 Then
CellCibleRow = CellSource.Value
With WSCible
.Range('G' & CellCibleRow) = CellSource.Offset(0, 1)
End With
Else: Bad = True
End If
Else: Bad = True
End If
Next
WBSource.Close True
If Bad Then MsgBox 'Something Wrong in the Import due to Lines Number'
End Sub