GiantPygmy
New Member
- Joined
- Jul 26, 2016
- Messages
- 6
Hello,
I'm attempting to get VBA to loop through cells on a sheet to collect information and then take that information from each cell and add it to a string variable.
so for a basic example I have a list of names in column A (the list constantly is updated and changed). I would like to be able to take a name and add it to a variable that will format it how I want, then get the next name and add it to the correct spot where I want to the same string. I would like the variable to be able to store a format like:
Name: *first name*
Name: * second name*
Name: *third name*
So on and so forth so until it has listed all the names in column A. Ultimately I am going to use this to copy it to the clipboard (which I already have worked out) but I just am not sure how to get all the elements to continue looping to collect the information and then add it to create one variable with all that information formatted how I need it to look.
I'm attempting to get VBA to loop through cells on a sheet to collect information and then take that information from each cell and add it to a string variable.
so for a basic example I have a list of names in column A (the list constantly is updated and changed). I would like to be able to take a name and add it to a variable that will format it how I want, then get the next name and add it to the correct spot where I want to the same string. I would like the variable to be able to store a format like:
Name: *first name*
Name: * second name*
Name: *third name*
So on and so forth so until it has listed all the names in column A. Ultimately I am going to use this to copy it to the clipboard (which I already have worked out) but I just am not sure how to get all the elements to continue looping to collect the information and then add it to create one variable with all that information formatted how I need it to look.