Your code works fine. Given a data table
![txnelson_0-1650513029866.png txnelson_0-1650513029866.png](https://community.jmp.com/t5/image/serverpage/image-id/41933i9A73C9C109A6BFD4/image-size/medium?v=v2&px=400)
and running a copy of your code
names default to here(1);
dt=current data table();
col={"A", "B"};
For( i = 1, i<= N Items( col ), i++,
empty_rows = dt << get rows where (is missing(as column(dt, col[i])));
if (nrows(empty_rows) > 0,
as column(dt, col[i])[empty_rows] = "N";
);
);
It results in the following
![txnelson_1-1650513120917.png txnelson_1-1650513120917.png](https://community.jmp.com/t5/image/serverpage/image-id/41934i894005C7B95A4119/image-size/medium?v=v2&px=400)
The issue you may be having is if your A,B,C,D,E columns are numeric, you will not be able to place a character value into the cell. JMP will convert it to a missing value "."
Jim