Hi jaffermo

Welcome to the Forum.

How many portfolios could there potentially be?
You mention
copy the different portfolio numbers into a specified row
In your sample file that's row 24. Is the specified row 24 or is the specified row "the 3rd row below the end of the data"?
Will the portfolio numbers be in column G and start on row 2?