I have the following set of example data:
OrderID LineNo OrderQty
102 1 10
102 2 5
103 1 2
103 2 3
103 3 20
If I then add another OrderLine for example OrderID = 102, I would like to increment the LineNo by 1 to in this case 3. How would I go about doing this in VBA ? ie If OrderID = 102, increment LineNo by 1 and by the same principle if I add an OrderLine for an OrderID that does not exist I need to number the LineNo from 1 to whatever the last line for that particular Order is.
Thanking you in advance.
Regards
Antony
OrderID LineNo OrderQty
102 1 10
102 2 5
103 1 2
103 2 3
103 3 20
If I then add another OrderLine for example OrderID = 102, I would like to increment the LineNo by 1 to in this case 3. How would I go about doing this in VBA ? ie If OrderID = 102, increment LineNo by 1 and by the same principle if I add an OrderLine for an OrderID that does not exist I need to number the LineNo from 1 to whatever the last line for that particular Order is.
Thanking you in advance.
Regards
Antony