Consulting

Results 1 to 4 of 4

Thread: Sleeper: Copy paste transpose multiple sheets onto one sheet

  1. #1

    Sleeper: Copy paste transpose multiple sheets onto one sheet

    Hello,
    I am trying to write a macro that will take a sheet from another workbook, copy, paste values and transpose the entire first row (A1:IV1) of a certain sheet(sheet1) into column A (A1:A256) of a new workbook (NewWorkbookSheet1). I would then like to take range A123:A372 (dates in sheet1) and copy, paste values, transpose in range B1:IQ1 of NewWorkbookSheet1. I would then like to copy, paste values and transpose range B123:B372 of sheet1 into B2:IQ2 of NewWorkbookSheet1, and do the same for C123:C372 of sheet1 into B3:IQ3 of NewWorkbookSheet1, and do the same for D123372 of sheet1 into B4:IQ4 of NewWorkbookSheet1, and so forth until IV123:IV372 is transposed into B256:IQ256.

    Once this process is complete, I want the macro to essentially do the same, but pull info from another sheet and paste into NewWorkbookSheet1. So the new command would be copy, paste values and transpose A1:IV1 of sheet2 into A257:A511 and then commence copy, paste, transpose B123:B372 sheet2 into B257:IQ257 of NewWorkbookSheet1, and then C123:C372 sheet2 into B258:IQ258 of NewWorkbookSheet1.
    Can anyone help me get started on this. I have little VBA knowledge and would like to learn.
    thanks to anyone who can lend a hand

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Hi,

    I moved your thread to the right forum.
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  3. #3
    I am working with something that looks like this.

    Sub PullinREturns()
        G:\Portfolio Mgmt - Due Diligence\Toolbox\_
        [Manager Analysis_new.xls] CurrentMgrs '!.Activate
        'would like it to reference this workbook sheet CurrentMgrs.  This line is not working
    Rows("1:1").Select
        Selection.Copy
        Windows("Book1").Activate
        'would like it to reference the workbook i am working in.The same workbook
        'where the macro is
    Range("A1").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=True
        G:\Portfolio Mgmt - Due Diligence\Toolbox\_
        [Manager Analysis_new.xls] CurrentMgrs '!.Activate
        'would like it to reference this workbook sheet CurrentMgrs.  This line is not working
    Rows("123:372").Select
        Application.CutCopyMode = False
        Selection.Copy
        Windows("Book1").Activate
        'would like it to reference the workbook i am working in.The same workbook
        'where the macro is
    Range("B1").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=True
    End Sub
    Can anyone help me with this
    much thanks

  4. #4
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    [uvba]some info for ya[/uvba] I took the liberty to add them myself, hope you don't mind.

Posting Permissions

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