+ Reply to Thread
Results 1 to 23 of 23

Need Macro to search from mater sheet and copy in another sheet based on Criteria

  1. #1
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Hello,

    I need your help in creating a Macro to fetch the details from Sheet1 and copy it in Search Sheet. It should take the value from A3:U4 in Search Sheet and based on the criteria (may be multiple criteria's as shown in Expected Result sheet) it should paste the result in Search sheet from A7.

    I have attached the sample file for your reference.

    Thanks in advance for your help!!

    Regards,
    Humac
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-06-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    This code should work ok as long as there are no more "insert_dates" added. Let me know if you will add more dates to the "insert_dates" columns

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Thanks for the code. Yes, the data will get updated daily.

    I will test and let you know.

  4. #4
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    It didnt fetch any data in search sheet when I enter date in L3 & L4 as (1/23/2012 & 1/27/2012). Please have a check.

  5. #5
    Registered User
    Join Date
    12-06-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Hopefully this should work ok. It takes into account the adding of new dates. Also it deletes the
    previous pasted info so is therefore always up to date.

    Let me know if there are any problems.


    Regards

    LL1980

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Hi LL1980,

    When I run the Macro its not generating any report in Search Sheet. Please have a check when you get time.

    Also I hope you have written this code for 1000 rows, am I correct?

    Thank You!!

    Regards,
    Humac

  7. #7
    Registered User
    Join Date
    12-06-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    I've attached a workbook with a macro button. But the dates entered must be in English format NOT American. ie ..... 27/02/12, NOT 02/27/12.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Ok thanks, I got the problem now. Sorry if my earlier question is not clear.

    It is not giving result when I enter only date in L3 & L4. It is giving result when it has date & team name in Column S. I need the query to be independent and need to generate report what ever the related feild I type in.

    For example, in status feild (U3) if I enter NEW it should generate report with all NEW in U3. Also if I need only Team F (S3) & NEW(U3) it should generate the report.

    Is it some thing possible?

    Thanks in advance for all your help!!

    Regards,
    Humac

  9. #9
    Registered User
    Join Date
    12-06-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Ah, i see what you mean ........... this should hopefully work now.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Thanks for your time LL1980....

    Its working only working for Insert_Time (L3 & L4) & Assigned_Group (S3) or Insert_Time & Status (U3) or Insert_Time (L3 & L4) & Assigned_Group (S3) & Status (U3). Its not working if I give only ID (A3) or Close_Time or Status.

    I am looking for a code which will generate report even with single parameter (Suppose if I give 1 in A3 it should display the details of ID 1)

    Please have a check.

    Regards,
    Humac

  11. #11
    Registered User
    Join Date
    12-06-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Can there be more than 1 criterian entered for the 3 date colums? ie, if the Insert_Time section is filled out then is
    it possible for the Close_Time section to also be specified?

  12. #12
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Yes there may be senarios like that as well.

    For example, if I need data of closed with in specific date range (Insert_time) then I will provide both the feilds.

    Regadrs,
    Humac

  13. #13
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Hello LL1980,

    Did you get a chance to look into this?

    Regards,
    Humac

  14. #14
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Bump no response..

  15. #15
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Why don't you adapt the code yourself ?
    You got 99% offered free.



  16. #16
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    humacdeep, my advice for you. Pick up an Excel VBA book and learn how to revise the code on your own. For some reason I am ashamed that I am from Chicago right now.

  17. #17
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    @ SNB - I am just learning the VBA, I tried to modify the code but I am unable to acomplish the result.

    @Jie - Thanks for your advice!! I have Excel 2007 VBA book and going through it. Dont be ashamed, I will work hard to learn it quickly and help others.

  18. #18
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    I tried to modify the code
    It didn't show in this thread.. nor in others.

  19. #19
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    I tried it in my system. I tried to add the below code for filtering the column A data and it didnt work.

    Please Login or Register  to view this content.
    I am not sure whether I did it correctly or not.

    Regards,
    Humac

  20. #20
    Registered User
    Join Date
    12-06-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    it is too long to do ................ pay some1 to do it

  21. #21
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Quote Originally Posted by LL1980 View Post
    it is too long to do ................ pay some1 to do it
    We are free labors after all with the exception of we get to choose when to stop and which post to take on.

  22. #22
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    My suggestion. Use SQL in MS Access. What you just describe in your original post is basically running queries.

  23. #23
    Forum Contributor
    Join Date
    09-10-2011
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    176

    Re: Need Macro to search from mater sheet and copy in another sheet based on Criteria

    Thanks Jie!! I will try that option.

+ 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