simple !! lolll
voici le code pour le moment que j'utilise , il reprends bien sur 2 fois le même chiffre puisque je n'arrive pas a comprendre cette histoire de Split ...
Sub MajRendements()
Sheets("RENDEMENTS").Select
Dim i%, k%, URL$, COT, REND
k = Cells(Rows.Count, [REF].Column).End(xlUp).Row
Range(Cells(2, [div2k18].Column), Cells(k, [div2k18].Column)).Clear
Range(Cells(2, [div2K19].Column), Cells(k, [div2K19].Column)).Clear
Range(Cells(2, [div2K20].Column), Cells(k, [div2K20].Column)).Clear
Range(Cells(2, [rend2018].Column), Cells(k, [rend2018].Column)).Clear
Range(Cells(2, [rend2019].Column), Cells(k, [rend2019].Column)).Clear
Range(Cells(2, [rend2020].Column), Cells(k, [rend2020].Column)).Clear
avant = "<td class=""c-table__cell c-table__cell--dotted c-table__cell--inherit-height c-table__cell--align-top / u-text-left u-text-right u-ellipsis"">"
apres = "</td>"
On Error Resume Next
For i = 2 To k
DoEvents
ReDim COT(1 To k, 1 To 1)
COT(1, 1) = Cells(i, [div2k18].Column).Value
URL = Cells(i, [www].Column).Value
Application.StatusBar = "Mise à jour des dividendes en cours …"
On Error Resume Next
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", URL, False
.Send
If .Status = 200 Then COT(i, 1) = Val(Split(Split(.responseText, avant)(1), apres)(0))
End With
Application.StatusBar = False
Cells(i, [div2k18].Column).Value = COT(i, 1)
Next
avant = "<td class=""c-table__cell c-table__cell--dotted c-table__cell--inherit-height c-table__cell--align-top / u-text-left u-text-right u-ellipsis"">"
apres = "</td>"
On Error Resume Next
For i = 2 To k
DoEvents
ReDim REND(1 To k, 1 To 1)
REND(1, 1) = Cells(i, [rend2018].Column).Value
URL = Cells(i, [www].Column).Value
Application.StatusBar = "Mise à jour des rendements en cours …"
On Error Resume Next
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", URL, False
.Send
If .Status = 200 Then REND(i, 1) = Val(Split(Split(.responseText, avant)(1), apres)(0))
End With
Application.StatusBar = False
Cells(i, [rend2018].Column).Value = REND(i, 1)
Next
Sheets("RENDEMENTS").Select
ActiveWorkbook.RefreshAll
End Sub