Zend certified PHP/Magento developer

Need help working with automator applescripts in Numbers on MacOS catalina

I am working with numbers sheet and I want to create a keyboard shortcut so that when I press a button the script searches for the number “1” in column I, when it finds the number “1” it will increase the number by “1” [add 1 or +1] to the cell in the column left of it, in this case column H.

I searched the forums and found this:

Quickly increase/decrease cell value by 1 in Numbers

tell application “Numbers”
set tTables to (tables of sheets of front document whose its selection range is not missing value)
repeat with t in tTables — tables of each sheet
if contents of t is not {} then — the list is not empty, it’s the selected sheet
set tCells to cells of selection range of (get item 1 of t) — selection in active table
repeat with i in tCells — each selected cell
set val to value of i
set value of i to (val + 1)
end repeat
return
end if
end repeat
end tell

it doesn’t work because it returns:

“Numbers got an error: Can’t make missing value into type range.”

when I try to see if it works from applescript.

When I try to use it in number it returns the following:

“The action “Run AppleScript” encountered an error: “Numbers got an error: Can’t make null into type range.” “

This was just so I could have a keyboard shortcut to add 1 to the value in the cell and it didnt even work.

any help would be greatly appreciated and thank you for your time and have a nice day.