Posted to microsoft.public.excel.programming
|
|
Adding two characters in front plus three in back
so...
a = "00"
b = Len(InvoiceNumber)
c = a +b
d = c + "-IN"
right?
Joel wrote:
I have a ffew commentts with your code
1) this statements in not necessary
InvoiceNumber = Right(InvoiceNumber, i)
Visual Basic will automatically lengthen you sttrings.
2) This statement is a test statementt and doesn't change the value of
cell2.value
If (Cell2.Value = "CM" & InvoiceNumber) Then
I don't see where you are really adding tow characters in front of the string
3) use these type statements for adding characters to front and back of
strings
a = "123"
b = "456"
c= a + b results in "123456"
d = "ab" + a results in "ab123"
e = a + "ab" results in "123ab"
Attached is my currect macro is adding two characters in the front would it
be possible to add three characters in the back also?
[quoted text clipped - 38 lines]
Next cell1
End Sub
--
Message posted via http://www.officekb.com
|