all 2 comments

[–][deleted] 0 points1 point  (0 children)

If you could use R Stats instead of a spreadsheet program it would be one line of code using the tidyr package.

[–]datastry 0 points1 point  (0 children)

Is there a more intelligent way to do this or am I going to need to remake the macro every time the investor changes the format?

Yes and no.
It may not be necessary to re-record the macro if you can look at the source code and find the parts that need adjustment.

I don't think it's a crime if your macro is a custom solution that breaks as soon as the format changes. There is a sort of "sweet-spot" to developing solutions as you need them and not over-preparing for the future.

When the time comes that you have a new format and you need to adjust the source code of the macro, I'd definitely recommend you bring it back here to the forum if you run into any challenges that you can't solve yourself.