What is in Cell H2? Do you have mixed text and number? Let's say that your purchase order starts with
"PO#-" followed by a five digit number Change the PO#- in the code to whatever is not numeric, and the length of the "00000" to match the number of digits in your PO number.
Sub Print50V2()
Dim i As Integer
Dim strPO As String
strPO = "PO#-"
For i = 1 To 50
Range("H2").Value = strPO & Format(Val(Mid(Range("H2").Value, Len(strPO) + 1, Len(Range("H2").Value))) + 1, "00000")
ActiveSheet.PrintOut
Next i
End Sub
Bookmarks