In the first screenshot you provided in place of write line use a assign activity and assign a string variablw witht he value youw ant that is check in then and unchecked in else
After if activity use a write cell activity with auto increment checked…and pass the variable assigned in the if condition
Cheers