Help on Looping

These variable names don't match the ones in the sample data you have posted before, to help us help you, could you please prepare a self-contained minimal reproducible example (reprex) illustrating your issue? A reprex makes it much easier for others to understand your issue and figure out how to help.
Please have a look at this guide, to see how to create one: