Вы можете сделать это либо по формуле, предложенной BigBen, либо использовать функцию VBA "Countif".
Я предполагаю, что данные выглядят так:
Код VBA:
Sub GenerateAlphaNumber()
Dim lrow As Long
lrow = Cells(Rows.Count, "B").End(xlUp).Row 'find the lastrow in column B
For i = 2 To lrow 'Loop from row 2 until last row
'Check that cell in column B is not empty. If thats' true, then perform countif
If Cells(i, "B").Value <> "" Then Cells(i, 1).Value = "NL-" & WorksheetFunction.CountIf(Range(Cells(2, "B"), Cells(i, "B")), Cells(i, "B").Value)
Next i
End Sub