1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Sub Industry_sector()
'remplissage de la colonne DM de Openfonds, colonne créee
Dim J As Long, Nblg As Long, Ligne As Long
Dim F1 As Worksheet, F2 As Worksheet
Dim Cel As Range
Set F1 = Sheets("CRDB")
Set F2 = Sheets("OF")
F2.Range("DM2:DM400").ClearContents
For J = 2 To F2.Range("J" & Rows.Count).End(xlUp).Row
'Set Cel = F5.Columns("AF").Find(what:=F1.Range("J" & J), LookIn:=xlValues, lookat:=xlWhole)
'If Not Cel Is Nothing Then
'F1.Range("DM" & Ligne) = F5.Range("T" & Cel.Row)
Set Cel = F1.Columns("AD").Find(what:=F2.Range("J" & J), LookIn:=xlValues, lookat:=xlWhole)
If Not Cel Is Nothing Then
F2.Range("DM" & Ligne) = F2.Range("T" & Cel.Row)
Ligne = Ligne + 1
End If
Next J
End Sub |