Skip to content

Instantly share code, notes, and snippets.

@RyanTG
Created October 17, 2017 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanTG/89811bbe409e68467ebe435db6cfcdc1 to your computer and use it in GitHub Desktop.
Save RyanTG/89811bbe409e68467ebe435db6cfcdc1 to your computer and use it in GitHub Desktop.
Excel function to turn SWITRS / TIMS violcat field into plain English
=IF(I2=1, "DUI", IF(I2=2, "Impeding Traffic", IF(I2=3, "Unsafe Speed", IF(I2=4, "Following Too Closely", IF(I2=5, "Wrong Side of Road", IF(I2=6, "Improper Passing", IF(I2=7, "Unsafe Lane Change", IF(I2=8, "Improper Turning", IF(I2=9, "Automobile Right of Way", IF(I2=10, "Pedestrian Right of Way", IF(I2=11, "Pedestrian Violation", IF(I2=12, "Traffic Signals and Signs", IF(I2=13, "Hazardous Parking", IF(I2=14, "Lights", IF(I2=15, "Brakes", IF(I2=16, "Other Equipment", IF(I2=17, "Other Hazardous Violation", IF(I2=18, "Other Than Driver (or Pedestrian)", IF(I2=19, "", IF(I2=20, "", IF(I2=21, "Unsafe Starting or Backing", IF(I2=22, "Other Improper Driving", IF(I2=23, "Pedestrian Under the Influence", IF(I2=24, "Fell Asleep", IF(I2=0, "Unknown", IF(I2="-", "Not Stated"))))))))))))))))))))))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment