I'd want to do this:
sed -i 's#cellname#$cell#g' file.txt
I meant to replace all "cellname" words with the value of variable $cell instead of "$cell" text.
ex: $cell = nand4
then after sed, file.txt will contains word "nand4" instead of "cellname"