From Microsoft Excel, you could use a second table to keep an easy record of which letter corresponds to each code. This would ideally live on a separate sheet but could be on the same:
Code | Value
------------
N | 12
M | 6
P | 6
CS | 6
R | 6
In your original table, your Code column should probably use data validation to force the user to choose one of these options. Assuming you're using a recent version of Excel, choose Data > Data Validation > Settings > Allow: List
, then for 'source' choose the first column of your new table.
Finally, your original table could have a 'Time' column which uses a VLOOKUP
formula to check the time-value of the Code. If you're unfamiliar with vlookup then watch this.