+ Reply to Thread
Results 1 to 11 of 11

Macro to Set Filter and Copy past

  1. #1
    Registered User
    Join Date
    02-14-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    22

    Macro to Set Filter and Copy past

    Hi All,

    I have created a Macro to for below.

    A)I have Codes on Sheet 2
    B) Source data on Sheet1
    C) Set filter in Sheet1, filter the data in sheet1 based on the codes on sheet2, copy data and paste it in Sheet3

    However, am facing following problems.

    A) Header row is not copied and pasted
    B)Initially it has to filter the data for the first code in Sheet2 and paste it in Sheet3 and later it has to set filter for second code and copy past so on.

    Could you please check the code and make changes.


    Please Login or Register  to view this content.
    Last edited by davesexcel; 03-03-2012 at 02:52 PM. Reason: Code tags required when showing VBA code

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

    Re: Macro to Set Filter and Copy past

    Why dont you attach the sample file?
    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]

  3. #3
    Registered User
    Join Date
    02-14-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Macro to Set Filter and Copy past

    Please find the file attached.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    04-03-2011
    Location
    India
    MS-Off Ver
    Excel 2015
    Posts
    122

    Re: Macro to Set Filter and Copy past

    Hi Srikanth

    There seems to be error in attached MY MACRO.xlsm. pls rectify or identify to resolve

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

    Re: Macro to Set Filter and Copy past

    Which sheet is your sheet2 in the workbook? Also which is sheet3?

  6. #6
    Registered User
    Join Date
    02-14-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Macro to Set Filter and Copy past

    Hi Sorry for the delay, attached the Sheet.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-14-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Macro to Set Filter and Copy past

    Can someone urgently help me with the query.

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

    Re: Macro to Set Filter and Copy past

    Should the data be copied one below the other? What is the purpose? Its the same as Sheet1.

    Also, there are duplicating order nos on sheet2. How do you want to handle this?

  9. #9
    Registered User
    Join Date
    02-14-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Macro to Set Filter and Copy past

    If we have more than one order number or many order number, Macro has to set the filter and copy that data and paste it in another.

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

    Re: Macro to Set Filter and Copy past

    Yes, but you have not answered my questions as in post 8.

  11. #11
    Registered User
    Join Date
    02-14-2012
    Location
    hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Macro to Set Filter and Copy past

    Should the data be copied one below the other? What is the purpose? Its the same as Sheet1.

    Answer: The data for One order should be copied and pasted and later it has to create separate sheete or Workbook. For each order, excel has to create a separate sheet and past the data

    Also, there are duplicating order nos on sheet2. How do you want to handle this?

    If we have 4 orders, then the macro has to copy all 3 and past it

+ 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