Skip to content
Advertisement

While loop function union function end

I want to loop the code shown below. I would like to use the [getpublicholidays] function for a variable number of years and merge them (union). Unfortunately I don’t know how to use the function in a loop with union. Can someone help?

Advertisement

Answer

If you are looping for X years, each time you loop to a new year, you won’t also need to union for other years. Rather, you need somewhere to store the results from one year to the next. Perhaps you are looking for something like this, where I am just making up columns for your function’s output since I have no idea what they really are…adjust accordingly…

If that’s not getting what you need, then we indeed need more details about what you are after.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement