Closed Thread
Results 1 to 4 of 4

Copy data from sheet1 into sheet2 in same workbook.

Hybrid View

  1. #1
    Registered User
    Join Date
    05-15-2008
    Posts
    6

    Copy data from sheet1 into sheet2 in same workbook.

    I have used the Data Validation feature of Excel 2003 to survey the members of my bowling league. Data Validation allowed the teams to respond to my questions directly into the spreadsheet I sent out to them. I have been able to combine all of the separate spreadsheets I've received from league members into one master spreadsheet containing five rows of data representing each respondent. I found macro code on this site to combine all of the spreadsheets into one master sheet.

    What I need now is macro code that will loop through this master spreadsheet to reformat this data by selectively copying various ranges within it to another spreadsheet in the same workbook. For example:
    1. Copy "Values" only from cell A1 in sheet1 to cells B3 thru B7 in sheet2, then delete the copied data from sheet1.
    2. Copy "Values" only from cells B3 thru B7 in sheet1 to cells D8 thru D12 in sheet2, then delete the copied data from sheet1. I’m deleting so that I can verified that all the data has been copied to the reformatted sheet (sheet2).

    I have a number of these Copy/Paste Special (Values) only operations to perform until the end of my master is reached or 500 rows have been processed; whatever is easier to code. I'm guessing some kind of loop is needed with variables used to increment the changing source and destination row and column addresses of my sheet1 and sheet data ranges. I.E. When the data in the second set of 5 rows is reformatted it needs to be copied just as items #1 and #2 shown above but the row numbers would need to be advanced by 5 since each respondent's data consists of 5 rows.

    Any and all help is appreciated.
    Thanks,
    John

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    John

    Not sure I follow your data source / data output combinations.

    Can you put up a sample workbook showing both the before and after situations and explain how that data is to be transferred.

    rylo

  3. #3
    Registered User
    Join Date
    04-29-2012
    Location
    Abu Dhabi
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Copy data from sheet1 into sheet2 in same workbook.

    Rylo,
    If sheet1 is used as master and different informations are incerted or written in the rows.
    Now sheet2,3,4 &5 are used as sort folders so relevent info can be exported.
    So how to auto import the info in rows with identifier and also retian the master.

    regards

    Shahzad

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy data from sheet1 into sheet2 in same workbook.

    PShahzad,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed 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