Start by Using
Option Explicit and declare the variables you use.
When using Worksheet_Change(ByVal
Target As Range) use Target.
You think what you've got works because you changed the value in cell O8 and then the Tab key took you to P8 where ActiveCell.Previous happens to be the Target.
That's not the case when you use the left, upper or down arrow.
Replace all those ActiveCell.Previous with Target.
Writing values to the sheet will have this procedure calling itself over and over.
Look into disabling and re-enabling Events to prevent this.
Have a read of
this.