+ Reply to Thread
Results 1 to 5 of 5

Transpose to the next available line

  1. #1
    Registered User
    Join Date
    07-11-2012
    Location
    Utah
    MS-Off Ver
    Excel 2007
    Posts
    74

    Transpose to the next available line

    I have to create an automatic push from one workbook as a column to another workbook as a row. The second book is our overall blotter so the data needs to go to the bottom of the sheet. I have tried several different methods to get it to paste to the next available row, but always come up with errors. anyone have any ideas.


    Please Login or Register  to view this content.
    Last edited by Cutter; 08-23-2012 at 02:41 PM. Reason: Added code tags

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,268

    Re: Transpose to the next available line

    Hi gherzberg,

    After you copy your column into the windows buffer and open and select your other workbook ("Blotter.xlsm") you need to learn this type of code.

    Dim LastRow as double
    LastRow = Cells(Rows.Count, "A").End(xlUp).Row + 1
    Cells(LastRow, "A").Select

    The above code will select the first blank cell in Column A. Then do your paste transpose.

    Hope this helps.

    For other ways see http://www.vbautomation.110mb.com/VB..._worksheet.htm
    Last edited by MarvinP; 08-23-2012 at 12:27 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    07-11-2012
    Location
    Utah
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Transpose to the next available line

    Thank you for your help, and please forgive my ignorance, but I inserted the code where you explained, and the code is showing as "this object doesn't support this property or method." any suggestion?


    Please Login or Register  to view this content.
    Last edited by Cutter; 08-23-2012 at 02:43 PM. Reason: Added code tags

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Transpose to the next available line

    @ gherzberg

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,268

    Re: Transpose to the next available line

    OK -

    Open both workbooks and record a macro from the first to do what you want to do.
    Stop recording the macro after you paste transpose.
    Open the module that recorded the macro and look at it.
    In the section that selects the cell to paste into... That is where you want to put my example code.

    We'll make a programmer out of you ....

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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