Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Paste array data to sheet (Excel VBA)

    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> Hello, I am transfering one row of data from sheet two and one row a data from sheet 3 into two arrays. I am comparing the data in array 1 to array two and if I find a match I am storing the match data into a third array. What has me stumped is I can not find a way to store/paste the third array into a column in sheet 1. Can someone help? I am a new to intermediate user of excel VBA. Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Paste array data to sheet (Excel VBA)

    Welcome to Woody's Lounge!

    If you fill an array from a row, and want to paste it into a column, you must transpose it. Here is an extremely simplified example:

    ReDim arr(1 To 6)
    arr = Range("A1:F1")
    Range("H1:H6") = Application.WorksheetFunction.Transpose(arr)

  3. #3
    New Lounger
    Join Date
    Mar 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Paste array data to sheet (Excel VBA)

    Hans!
    That was it! The code worked great. Thanks for the quick response and the help.
    Richard

Posting Permissions

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