Posts by F_Sadr

    Thank you very much; it's working and very interesting too but I'm a bit confused about the parameters you have passed to the Index function. Would you please help explain a bit about the Application.Transpose([row(1:250)]) part? The first unfamiliar thing for me was the strange syntax of using brackets [] in it (which I just guessed is to define an Array structure) and the next one, was the use of "Transpose". Wasn't there a way to directly specify a one-row-multi-column array structure through something like Column(1:250)?

    Hello guys. I have an extremely large array of String in Excel VBA and I want to dump different parts of it onto different worksheets. To make it faster, I'm of course intending to do a single-step dump, so if I call that big array "DataCache ()" I want to do something like:



    Sheets (1).Range ("B2").Resize (1000000,250).Value = DataCache (2,2)         ' Starting from the slot (2,2) of the array and dump onto sheet1

    Sheets (2).Range ("B2").Resize (1000000,250).Value = DataCache (2000000,5)   ' Similar thing from array slot (2000000,5) for sheet2

    ...



    Is there any way to do this without having to copy the 2nd portion of the array into a new array? I was thinking maybe I can do something like this (conceptually) :


    Dim SubArry () As String

    ....

    SubArray = VarPtr ( DataCache (2000000, 5))

    Sheets (2).Range ("B2").Resize (1000000,250).Value = SubArray


    I'd appreciate it if anyone could help me with this. I'm using "Microsoft VBA 7.1" on Office 2021 x64.