Voici le code (dont la quasi totalité a été écrit par Steelson) qui me donne des cellules vides.
Sub MajCotations()
Dim i%, k%, URL$, COT
k = Cells(Rows.Count, [REF].Column).End(xlUp).Row
Range(Cells(2, [Cotation].Column), Cells(k, [Cotation].Column)).Clear
avant = "<span class=""c-instrument c-instrument--variation"" data-ist-variation>"
apres = "</span>"
On Error Resume Next
For i = 2 To k
DoEvents
ReDim COT(1 To k, 1 To 1)
COT(1, 1) = Cells(i, [Cotation].Column).Value
URL = Cells(i, [WWW].Column).Value
Application.StatusBar = "Mise à jour des cotations 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, [Cotation].Column).Value = COT(i, 1)
Next
Dim a As String
a = InputBox("Souhaitez-vous archiver les données sur la base principal ? Tapez 'oui' ou 'non'")
If a = "oui" Then
Call Archives_princ
Else
End If
MsgBox ("La mise à jour des cotations est terminée")
End Sub