Column A, B and C are values which describe a product. I want column D to generate a sequential number based on the contents of a given cell in column A. Together the four values make up the product code.

Column A: Location

Column B: Species

Column C: Date

Column D: Reference Number

There are multiple locations which will fill the cells in column A. I want the reference number sequence to begin with 1 for each location. My approach is to use a nested IF formula to isolate the locations, but I can't figure out how to generate a unique sequential reference number. Any thoughts?

-Tom

Burlington, VT