+ Reply to Thread
Results 1 to 5 of 5

Copy from horizontal and Paste into vertical VBA Code

  1. #1
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Copy from horizontal and Paste into vertical VBA Code

    I have some data coming from Access database based on the Scenario ID. After being inputted in Access database the results will paste in Sheet1. I need the information in Sheet 1 to be extrapolated to Sheet 2 from horizontal to vertical. Once value one from Sheet 1 , goes to Sheet 2 and fills out vertically, I need it to go check if value 2 is present in sheet 1 and do the same thing, i.e bring it to sheet 2 vertically. If value 2 is not there then it needs to stop at that point.

    In my example case I have 3 scenarios, so after copying and pasting 3 scenario from sheet1 to sheet2 it should stop however, if there was a value 4 in there it needs to continue until there are no more values to be extrapolated to sheet 2. Attached is a sample copy for reference.

    Any Help Will be appreciated..
    Attached Files Attached Files
    Last edited by raw_geek; 08-11-2015 at 06:47 AM. Reason: done

  2. #2
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: Copy from horizontal and Paste into vertical VBA Code

    Hi -

    Try
    Please Login or Register  to view this content.
    event
    Last edited by event21; 08-11-2015 at 12:24 AM.

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Copy from horizontal and Paste into vertical VBA Code

    Hi,

    Try this code

    Please Login or Register  to view this content.
    Check out the file attached..

    Click on the Run Button and check out Sheet2
    Attached Files Attached Files
    Last edited by NeedForExcel; 08-11-2015 at 01:09 AM.
    Cheers!
    Deep Dave

  4. #4
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Re: Copy from horizontal and Paste into vertical VBA Code

    both worked.. thanks you guys are awesome..

  5. #5
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Copy from horizontal and Paste into vertical VBA Code

    Glad to have helped..

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Copy and paste from Vertical to Horizontal
    By mardskee in forum Excel General
    Replies: 6
    Last Post: 03-27-2025, 05:13 PM
  2. Copy and paste from Vertical to Horizontal
    By kisanvikas2015 in forum Excel General
    Replies: 2
    Last Post: 06-08-2015, 05:30 AM
  3. Copy vertical and paste horizontal... with a twist
    By silkyjay in forum Excel General
    Replies: 4
    Last Post: 12-11-2014, 11:54 AM
  4. Vertical Copy to Horizontal paste
    By cbeckwith in forum Excel General
    Replies: 5
    Last Post: 08-31-2012, 05:13 PM
  5. [SOLVED] Copying Horizontal Cells and Paste them in Vertical
    By vijaykonduru in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2012, 04:09 AM
  6. Copy Horizontal to Paste Vertical and vice versa
    By Jenrich in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-10-2009, 06:50 PM
  7. Copying Horizontal to paste vertical
    By Staberinde in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 11-06-2009, 04:35 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