Dim st As String ="" Dim i As Integer For i = 1 To 1140 Step 5 If st > "" Then If DecToHex(i).Length = 1 st = st & "," & "0" & DecToHex(i) Else st = st & "," & DecToHex(i) End If Else If DecToHex(i).Length = 1 st = "0" & DecToHex(i) Else st = DecToHex(i) End If End If Next