View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
mx315 mx315 is offline
external usenet poster
 
Posts: 8
Default Automatically Assign Stock Number By Model

Then date is generated by this code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Not Intersect(Target, Range("B2:B1000")) Is Nothing Then
With Target(1, 4)
.Value = Date
.EntireColumn.AutoFit
End With
End If
End Sub

If the last stock number I used for a Tundra was 26-1258 then the next
would need to be 26-1259. But for the Camry the it may be a number like
16-3685 then next would have to be 16-3686. They would need to go in
seqence and bound by the model name. I would have to start with the
last number we have used with our current setup. Is there a way to make
the numbers start with a certain number then go in sequence?

"Does each model need to be tracked separtely (ie, by a separate
sequential number)?" Yes, If I understand correctly it would need to be
tracked seperately.

Dave O wrote:
How is the date added to col E- is it done by an "on change" event that
triggers a bit of code in the worksheet?

Also, if the current Tundra model is 26-1258 and the next entry is a
Camry, is the stock number 16-1259 or does each model need to be
tracked separtely (ie, by a separate sequential number)?