Hi all, here is the code suggested to me (by nigelog with the aid of jindon) from a previous thread I posted. As I'm still just learning VBA I am trying to make sure I understand all aspects of it.
My question is about the Application.Transpose, in another thread " What to avoid in VBA" the following code line is written by shg:
So why does the code need the transpose, and what decides it?
Do I absolutely need an array in that code if I'm working within a table? (listobject) (It is important to refer to the columns by their headers!! They are also not adjacent.)
Also what does the 0 "decides" after the .Value, what would change if it was 1 in the code line?
I got a few answers so far saying about 1 dimensional and 2 dimensional vectors.. but I think I need this a bit more "visually".. I can see that Range ("A1:G1") is a single line (1 dimensional?), but the way I see it listrow(i) is also just a single line (1 dimensional?)? Or is it because its not every value I need concatenated from listrow(i) only 3 of them from 3 not adjacent columns?
Does x really need to be declared and the array defined, could it not be that instead of x in the "DictKey=" line we would just write the columns identified by their headers? Or is it 2 dimensional BECAUSE I'm identifying them by their headers? As it can't just count from left to right it has to look up to the top of the table to check the column header?
Can somebody help to clear this up for me?
My previous thread: https://www.excelforum.com/excel-pro...al-failed.html
"What to avoid in VBA" thread: https://www.excelforum.com/excel-pro...in-vba-11.html