It is not the nature of a FOR loop, that you increment the counter inside again:
But the FOR loop is not needed at all here. Your variable "cont" seems, like you would rather prefer a while cont loop. Anyhow, a loop over all elements of T is not useful.
I suggest to stop an infinite loop, if the input name is empty:
name = input('Name (empty to stop the loop):', 's');
The error message means, that you cannot compare "E == T(i,1)", because the left hand side is a cell. strcmpi compares strings with cell strings even insensitive for the case. And you want compare with all names, which is "T(:, 1)". Then strcmpi replies all matching indices as logical vector.
You will get the next error soon, because fprintf cannot handle cells also. But as usual in Matlab, the documentation explains how to printf cell strings: doc fprintf.