Here is an explanation to my code:
Sub BarCode()
' Declare variable types (I gave them random letters - a, b, and c but could be x, y, and z or any other letter or name you choose
Dim a As Integer, b As Integer, c As Integer, d As Integer, e As String, r As Long
' Create four nested loops
For a = 1 To 8
For b = 1 To 72
For c = 1 To 13
For d = 1 To 16
' go to next row
r = r + 1
' Convert the variable "a" to one of the letters you wanted
e = Choose(a, "A", "B", "C", "D", "E", "F", "G", "H")
' Concantenate all the numbers and letter together
Range("A" & r) = e & " - " & Format(b, "00") & " - " & Format(c, "00") & " - " & Format(d, "00")
Next
Next
Next
Next
End Sub
Bookmarks