protonLeah,
Thanks once again for replying to my post. The coding update you provided nicely illustrated how to use public functions, enabling a one-time-only read of a large array for any number of function calls that use the array. This indeed saved a lot of time when scaling up and running the code on my real dataset. Greatly appreciated.
There were some index mismatching issues lurking in v3(vba), which are resolved in v4 and posted here for completeness. [You may not have caught it because your sheet "B" function-calls reference the Select Case SD = "TsdA", but should reference SD = "TsdB". When the functions are given the intended SD argument, the result blows up]. What I learned was that the array read (at least as implemented here) always results in an index starting with "1" (note we elected to use Option Base 1 for this function). I thought that this code would (as I intended) put data from worksheet "markers" row X into array-element-row X. To resolve this I started doing some more complicated index adjustments, but then realized it was just simpler to let the array read .Range("E1:E25"). instead of starting at E6. So, the first few elements of the array capture whatever garbage I have in the first five header rows, but the array-element-index is now aligned with the "marker" worksheet row numbers, making QC much easier when dealing with all the data.
I need help with at least one last enhancement to this project, and will post that on another thread.
This issue SOLVED.
Cheers!
G
Bookmarks