Hi,
First note that you're working with "macro variables" and not "macros". That's two different things.
So I would use %let newmcrvar= rather than %let newmacro=.
Second, it is a good practice to add a dot at the end of a macro variable call. You will otherwise face some issues if you have dots in your string e.g. a dot in a filename (myfile.xlsx)
Third, when you use two ampersands one after the other, they are converted to a single ampersand.
So, in your case, you currently get "test1" as output but you actually want "&test1." which will be automatically converted to 5000 in the second internal loop.
I let you figure out the solution with this extra info.
... View more