12-07-2017 12:49 PM
What I'm getting out of this is that he needs a database, or a jagged array that he can build as he goes. The word "transpose" doesn't really even belong in this conversation. Of course, that's just what I'm getting out of this.
12-07-2017 01:19 PM
The main problem is that all your examples have way too many duplicate entries and it is thus impossible to tell where each element of the source ends up in the target array.
You need to create an example table that only contains unique entries. Then tell us how the solution would look like for that input.
12-12-2017 03:15 PM
Thanks for all your suggestions, i have finally figured out how to do this simply by following arteitle suggestion and went through the array row by row this is my solution. feel free to comment its the only way i will learn.
12-12-2017 04:08 PM
Seems overly complicated.
There is way too much symmetry in the current input, for example name, min, max are nearly 100% correlated (except for S/N=003-test 4-min). If this is always the case, you should be able to leverage that symmetry for much simpler code. If this is not the case, things seem fragile. For example if you would set "S/N=003-test 4-min = 8", you would get an extra column in the output. Seems very confusing.
I think this all could be done with 10% of the current code. Where does the data come from and what do the fields mean?
12-12-2017 07:48 PM - edited 12-12-2017 07:48 PM
Here is doing it the way I was talking about. (I might have used different array functions than I first stated, but the idea is the same.)