Control columns to edit and override value in cell

after further testing the solution previously posted does not work if the sort order of the table is changed. the selected cells starts to jump all over the place until i sort the table back to how it was orginally. then it starts to work correctly.