Option Explicit
Sub test()
Dim TE(), LE&, TS(), LS&, NLst&
TE = ActiveSheet.[A5].Resize(ActiveSheet.[A10000].End(xlUp).Row - 4).Value
ReDim TS(1 To 2 * UBound(TE, 1), 1 To 2)
For LE = 1 To UBound(TE, 1)
If LE Mod 4 = 1 Then
If LS > 1 Then LS = LS + 1: TS(LS, 1) = "</ul>"
LS = LS + 1: TS(LS, 1) = "<ul class=""list_ul"">": End If
NLst = NLst + 1: LS = LS + 1: TS(LS, 2) = "<li class=""bloc""><a href="""" onMouseOver=""ChangeMessage('" _
& TE(LE, 1) & "','ejs_texte','" & TE(LE, 1) & "')"" onMouseOut=""ChangeMessage('','ejs_texte')"" id=""list-" _
& Format(NLst, "00") & """>" & TE(LE, 1) & "</a></li>": Next LE
LS = LS + 1: TS(LS, 1) = "</ul>"
ActiveSheet.[H5].Resize(UBound(TS, 1), 2).Value = TS
End Sub