Results 1 to 2 of 2

Thread: Transposing arrays to the worksheet

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Apr 2011
    Posts
    190
    Rep Power
    15

    Transposing arrays to the worksheet

    I am using the code below to move data from a two dimensional array to the worksheet – I would however like to only transpose certain elements within the array – so let’s say the array is 7 by 12 elements - is there a way to only transpose the elements 3,2 to 3,9 (my arrays are option base zero).
    If this cannot be done – what is the best way to create a new array that only contain the elements 3,2 to 3,9 – that way I can still use the .transpose function. My arrays are quite large and I don’t want to use a loop – as it is too slow.

    Code:
    Astr = Split(Cells(1, ColFirst).Address, "$")(1) & LastRow + 1 & ":" & _
                    Split(Cells(1, ColFirst + UBound(Pnames) - 1).Address, "$")(1) & _
                    LastRow + 1 + UBound(WetChem, 2) - 1
    
    
     ActiveSheet.Range(Astr).Value = Application.WorksheetFunction.Transpose(WetChem)

    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 10-02-2023 at 12:57 PM.
    xl2007 - Windows 7
    xl hates the 255 number

Similar Threads

  1. Filter In Arrays
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 05-28-2013, 08:40 PM
  2. Print Nth Worksheet To Mth Worksheet using VBA
    By Ryan_Bernal in forum Excel Help
    Replies: 2
    Last Post: 02-28-2013, 06:57 PM
  3. Replies: 14
    Last Post: 01-26-2013, 04:58 AM
  4. Create list with arrays
    By PcMax in forum Excel Help
    Replies: 2
    Last Post: 04-10-2012, 11:05 PM
  5. Making a Histogram Chart Using Arrays
    By Rasm in forum Download Center
    Replies: 2
    Last Post: 04-05-2011, 07:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •