Hi,
Assuming you mean the last worksheet is the one furthest to the right, and not necessarily the last one introduced, then you could use the following bit of code to derive the sheet name as a string, and build this string into your existing code in place of the hard coded names.
As for the called procedure, I wonder whether you need it. If you Dim'd an an array in your main procedure and then populated your array as follows
You could then use a For x = 1 to ? ... Next loop, which is set to however many column reference items there are in the array, and then use the x counter to pick the first, second etc value from the array and use that .
So instead of your
you would have
HTH
Bookmarks