I am not sure what you are trying to accomplish to reuse those variables. Perhaps you code should run before the multirow call?