+ Reply to Thread
Results 1 to 4 of 4

copy and transpose two arrays to new worksheet and append to existing data

  1. #1
    Registered User
    Join Date
    09-22-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    38

    copy and transpose two arrays to new worksheet and append to existing data

    Attached & below is an excerpt from a more involved process. The tab “MasterCSV “worksheet will get overwritten with new data which will contain anywhere from the three companies/tickers I have in my example to hundreds. Fortunately, the dimensions that I want to copy and transpose are consistent. Essentially for each ‘set’ of information for a ticker there are two arrays of info, one which needs to be copied and transposed into “TransposeMaster” (109x11 to 11x109) and the other just copied and pasted into “TransposeMaster” (11x10). I’m pretty early on in my vba knowledge accumulation, so I’m sure my issues are simple for advanced users. There are couple of misused items and objects I’m not sure how to describe:

    Please Login or Register  to view this content.
    In addition to my transpose issues, how would I introduce a mechanism such that when I have new data overwritten in the “MasterCSV” - when I perform the transpose code the copy/transpose/paste is appended to the “TransposeMaster” starting right after the last row with data?
    Thanks in advance for any help!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: copy and transpose two arrays to new worksheet and append to existing data

    Try this...

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    09-22-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: copy and transpose two arrays to new worksheet and append to existing data

    Wow!

    Simplified and elegant, works like a charm, and even does some of the text parsing I was going to research later. I have some new things to research, like Resize.

    Followup Question: if I wanted to further modify this such that I don't clear the contents in wsTM, but add to the existing content in wsTM when i have new data in wsCSV how would i do that? /i have already played around with taking out the clear contents line and setting j to start with LastRow instead of 2, but it's apparent i'm not sure how it works exactly.

    Anyways this is super helpful I really appreciate it.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: copy and transpose two arrays to new worksheet and append to existing data

    You're welcome.

    Quote Originally Posted by Nerpilis View Post
    Followup Question: if I wanted to further modify this such that I don't clear the contents in wsTM, but add to the existing content in wsTM when i have new data in wsCSV how would i do that? /i have already played around with taking out the clear contents line and setting j to start with LastRow instead of 2, but it's apparent i'm not sure how it works exactly.
    LastRow is is determined from wsCSV at the start of the macro.
    Just set j to the last row + 1 from wsTM.

    Please Login or Register  to view this content.

+ 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] Copy row and append to existing row.
    By hushlilbaby in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2015, 01:24 AM
  2. Replies: 11
    Last Post: 11-04-2013, 04:32 PM
  3. Replies: 3
    Last Post: 10-14-2013, 03:06 PM
  4. Help: Import text > transpose > append to new worksheet
    By javamom in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-19-2006, 10:35 PM
  5. [SOLVED] Append columns to existing worksheet?
    By Chris Burnette in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2005, 06:20 PM
  6. Append columns to existing worksheet?
    By Chris Burnette in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2005, 06:17 PM
  7. append Data into an existing worksheet
    By Naresh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-11-2005, 03:36 AM

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