This is the most frequently asked question in this forum. The answer is easy: Don't do this. It is a shot in your knee.
Better:
NameList = {'Attendance', 'Absence'};
for ii = 1:2
TableList.(NameList{ii}) = table(variables);
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!