Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,570
- Office Version
- 365
- 2016
- Platform
- Windows
I have this line of code in my project...
Its purpose is to create a value for cell A(row) = the combined values of cell B(row) (a true date value formatted as yyyy-mm-dd), and the row number (i) minus 1.
So, if the date value in B2 = 2019-06-24, then what I would like to get for A2 is a value of 43640001 (the date serial combined with the previous row number)
What I am getting instead is 4E+07.
Suggestions for improvement?
Code:
.Cells(i, 1) = CStr(CLng(.Cells(i, 2)) & Format(i - 1, "000"))
Its purpose is to create a value for cell A(row) = the combined values of cell B(row) (a true date value formatted as yyyy-mm-dd), and the row number (i) minus 1.
So, if the date value in B2 = 2019-06-24, then what I would like to get for A2 is a value of 43640001 (the date serial combined with the previous row number)
What I am getting instead is 4E+07.
Suggestions for improvement?