Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This sub works to add 1 to an invoice #, complete with padding 0's,
but when I get to invoice # C99999, I hit an overflow error. Can I make the formatting floating but with a minimum of 5 places? Rob Sub test() Dim x As String Dim y As Integer Dim pref As String x = Sheet1.[A1].Value y = Evaluate(Mid(x, 2, Len(x) - 1)) y = y + 1 x = "C" & Format(y, "00000") Sheet1.[A1].Value = x End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell padding | Excel Discussion (Misc queries) | |||
Padding and Concatenate | Excel Discussion (Misc queries) | |||
padding ? | Excel Discussion (Misc queries) | |||
Padding Numbers | Excel Programming | |||
Value padding in VBA | Excel Programming |