Auto-populate a new row that includes a sequential number

I have a two part question.

1) I would like to create a table that auto-populates a new row that includes a sequential ID number (which includes text), whenever a previous row is filled out. For example:
Table Example

In the example, "19-NBCC-0162" (in the "Tracking Number" column (column A) of row 510) is the ID number I would like to auto-populate when I enter data into the row above it (row 509). I with thinking the new tracking number would appear when data is entered into the "Office" or "Date assigned" columns (C and F) of row 509.

2)The formula I have assigned to the "Tracking number" column cells, in order to include text with sequential number formatting, is:

="19-NBCC" & TEXT(ROW(A161),"-0000")

At the moment, I am not sure if this code would work when combined with the auto-population of a new row concept. If there is a better way to create sequential number formatting with text, I would love to know. And if the two issues can work together, where the Tracking number is auto-populated even better!


If I have understood it correctly, in the bottom-most row you want to always have the next number populated, together with other empty cells (only having a dropdown lists each).

Dropdowns on cells can be achieved by copy pasting them down. No values selected, means they remain empty until someone selects a value.

Now, your main formula in the "Tracking number" column. For example, if there is something written in the column "Office" previous row 509, we enter the number. Otherwise, leave it with empty string "".

=IF(F509<>"","19-NBCC" & TEXT(ROW(A161),"-0000"),"")

I would fill this formula in entire column.