Results 1 to 3 of 3

vba to manipulate range

Threaded View

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    ontario
    MS-Off Ver
    Excel 2007
    Posts
    16

    vba to manipulate range

    Hello,
    I want to transpose and invert a source range composed from 6 rows and 10 columns.
    There is an attached picture, that represent my goal.

    i wrote this code in vba :

    Sub att11()

    Dim inRng As Range
    Set inRng = Sheets("dQP").Range("_A")


    Dim Xin As Variant
    Dim Xout As Variant

    Xin = inRng.Value

    ReDim Xin(6, 10)
    ReDim Xout(10, 6)

    For i = 0 To UBound(Xin, 2)

    For j = 0 To UBound(Xin, 1)

    Xout(i, j) = Xin(UBound(Xin, 1) - j, i)

    Next j
    Next i

    Debug.Print Xout(1, 1)

    End Sub

    AND,
    i dont understand why Xout is empty.
    when i call some value from within it, the result is always nothing.


    Can someone help me please?
    thanks a lot
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1