scan text in one cell and write another one

THANKS a lot for you suggest and time, but i still continue to do not understand where i set the instruction: rewrite the column 77_OMM.

With your screenshot i cannot understand this :frowning:

In my mind should be something like this:
$77bis$ = "YES" THEN rewrite 77_OMM with "1"
$77bib$ = "YES" THEN rewrite 77_OMM with "2"
TRUE => ""