+ Reply to Thread
Results 1 to 2 of 2

Macro to copy data from one worksheet to another

  1. #1
    Registered User
    Join Date
    10-29-2011
    Location
    Cambridge, england
    MS-Off Ver
    Excel 2003
    Posts
    1

    Macro to copy data from one worksheet to another

    Hi,

    I would like to create a macro that allows me to copy data from a one worksheet to another in the same XL document. Attached is an example of what I'm trying to do.

    I have data from a market survey on people who have bought different types of coffee - see attached (this is not the real data; I have reproduced something just for the purpose of this question; in my real data I have ~18000 rows and >80 columns). I need to do an analysis for all respondents and then repeat the same analysis but for each different type of product bought. At the end, I would like to have one worksheet for each type of coffee bought.

    My idea is
    1) do the analysis with pivot tables in Analysis Master Sheet for all products bought
    2) use the macro to copy the data into the "All Products" worksheet
    3) change cell (B,1)in Analysis Master Sheet to the next product type (e.g. Caffee Latte)
    4) use the macro to copy the data into the "Caffee Latte" worksheet
    5) etc...

    [BTW - if you think this is a daft idea and there is a much easier way... feel free to let me know]

    Can anyone help me with the macro? I have never written one, so assume I know nothing about macros.

    Thanks for any help
    Kind regards,
    Laurent
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-22-2011
    Location
    Rhône Alpes, France
    MS-Off Ver
    Excel 2007
    Posts
    201

    Re: Macro to copy data from one worksheet to another

    Hay,
    Instead of using a macro, I propose to stay with Pivot Table options
    PT selected report filter with product bought :
    Options => Pivot Table Options => Options => View the pages of the report filter
    Filter view all pages of the report => Valid OK
    This will create automaticaly a separate sheet for all the product bought
    Apply the same procedure for respondent Id
    Best regards
    Attached Files Attached Files

+ 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