+ Reply to Thread
Results 1 to 5 of 5

Transpose specified number of values with VBA

  1. #1
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Transpose specified number of values with VBA

    Hello everyone I am stuck again with a simple problem of VBA as I am a just a novice in VBA.

    I need a macro to copy 4 values i.e. from Sheet "a" range>B3:B6 and paste to sheet "b" range>>C2:F2 transposed
    But I don't always require to copy 4 values...they might change to 5 or 6 or anything...so in sheet "a" cell C3 I put the number of values that are to be copied...i.e. for this example I put 4 in Sheet "a" C3..

    I made a macro-

    Please Login or Register  to view this content.
    But this macro is only copying B3 to C2:F2
    Please guide me where I am going wrong ..
    I have attached the workbook...
    Any help is greatly appreciated!!!
    Attached Files Attached Files
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Transpose specified number of values with VBA

    Perhaps.
    Please Login or Register  to view this content.
    End Sub
    If posting code please use code tags, see here.

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Transpose specified number of values with VBA

    Norie beat me to it...

    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  4. #4
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Transpose specified number of values with VBA

    This works perfectly...
    Thanks a lot to both of you..
    I need to learn a lot still...

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Transpose specified number of values with VBA

    You are very welcome and thanks for the 'rep'

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Transpose a long column into delimiters separated values according to values in input box
    By prkhan56 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-27-2014, 01:32 PM
  2. [SOLVED] transpose values into one row
    By artefarct in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-01-2014, 03:04 AM
  3. transpose a negative number to positive
    By OAKLEY in forum Excel General
    Replies: 4
    Last Post: 09-28-2012, 09:17 AM
  4. Transpose values ???
    By brooklyn in forum Excel General
    Replies: 0
    Last Post: 06-06-2007, 07:43 PM
  5. [SOLVED] I WANT TO TRANSPOSE LINKS, AS WE TRANSPOSE VALUES
    By Umair Aslam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-22-2005, 09:05 AM

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