title: How to reflect dates on specific cells corresponding to a list item chosen in Excel?
body: <p>Basically I have an excel sheet used for tracking statuses in hiring, where there are around 5 statuses (Briefing, Advertising, Shortlisting, Selection, Offering) and against each vacancy there's a status cell as a list of the above statuses and it's changed manually based on the status of the vacancy.</p>
  
  <p>I have found a vba code (attached below) to reflect in a certain cell the date that the status has been changed, and if I choose another status (basically update the status) it overwrites the previous input, but what I need to do is a bit more complicated.</p>
  
  <p>I created a column for each status and I need this code to reflect the date on each status's cell corresponding to the one I have chosen from the list, for example, choosing briefing for a specific vacancy will reflect the date on the corresponding cell in the "briefing" column, and if I change the status for that specific vacancy from the list to "selection", a date will reflect on the corresponding cell in the "selection" column.</p>
  
  <p>The code that I've found so far is below:</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  'Update 20140722
  Dim WorkRng As Range
  Dim Rng As Range
  Dim xOffsetColumn As Integer
  Set WorkRng = Intersect(Application.ActiveSheet.Range("N:N"), Target)
  xOffsetColumn = 1
  If Not WorkRng Is Nothing Then
  Application.EnableEvents = False
  For Each Rng In WorkRng
  If Not VBA.IsEmpty(Rng.Value) Then
  Rng.Offset(0, xOffsetColumn).Value = Now
  Rng.Offset(0, xOffsetColumn).NumberFormat = "dd-mm-yyyy"
  Else
  Rng.Offset(0, xOffsetColumn).ClearContents
  End If
  Next
  Application.EnableEvents = True
  End If
  End Sub
  </code></pre>