Hello All,
Previously, I use this code to start record my customer inquiry daily, and now I want to amend it and easier for analysis monthly records if my superior needs. However I get stuck on sequential number generation.
I created a calendar in VBA at first, select the inquiry date when someone inquired, and secondly, I wonder can it be generate the next new sequential number automatic like below table.
remarks:
case# in column C should be using 001, 002, 003, 004...... instead of single numbers 1, 2, 3, 4
(I curious why the outcome was single. I'm sorry)
Thanks All for the great guidance.
kelvin
Previously, I use this code to start record my customer inquiry daily, and now I want to amend it and easier for analysis monthly records if my superior needs. However I get stuck on sequential number generation.
VBA Code:
Sub Macro1()
Range("A1000").End(xlUp).Offset(1, 0).Select
Selection.Value = Selection.Offset(-1, 0).Value + 1
End Sub
Book1 | ||||||
---|---|---|---|---|---|---|
A | C | |||||
1 | BASIC INFORMATION | |||||
2 | DATE (MM-DD-YYYY) | CASE # | ||||
3 | Apr-05-2020 | 1 | ||||
4 | Apr-05-2020 | 2 | ||||
5 | Apr-06-2020 | 1 | ||||
6 | Apr-06-2020 | 2 | ||||
7 | Apr-06-2020 | 3 | ||||
8 | Apr-06-2020 | 4 | ||||
9 | Apr-06-2020 | 5 | ||||
10 | Apr-06-2020 | 6 | ||||
11 | Apr-07-2020 | 1 | ||||
12 | Apr-07-2020 | 2 | ||||
13 | Apr-07-2020 | 3 | ||||
14 | Apr-07-2020 | 4 | ||||
15 | Apr-07-2020 | 5 | ||||
16 | Apr-07-2020 | 6 | ||||
17 | Apr-07-2020 | 7 | ||||
18 | Apr-07-2020 | 8 | ||||
19 | Apr-08-2020 | 1 | ||||
20 | Apr-08-2020 | 2 | ||||
21 | Apr-08-2020 | 3 | ||||
22 | Apr-08-2020 | 4 | ||||
DATABASE |
remarks:
case# in column C should be using 001, 002, 003, 004...... instead of single numbers 1, 2, 3, 4
(I curious why the outcome was single. I'm sorry)
Thanks All for the great guidance.
kelvin