I have a table in C column There are text value inputs.(starting from C2 to down)

I want to write to F column;(starting from F2 to down)
if the right 5 char of C column inputed text is "abcde" =1
if not "abcde" =2

with a formula on F2 cell =IF(RIGHT(C2,5)="abcde",1,2) I can get what I want.

But with a macro I need to write to F column this result as directly "1", or "2" , according to C column entries.

Input on C column is going to down, when input realised to C column , it must be written to F column in same row.

Thanks in advance for any reply and help.

Regards,
turist.