+ Reply to Thread
Results 1 to 8 of 8

Need to find date from one sheet and paste in 2nd sheet

  1. #1
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Exclamation Need to find date from one sheet and paste in 2nd sheet

    Hi all,

    I have some data on sheet 1 with date and order no. i need to find only one certain date results, and i need to paste those in 2nd sheet. here we can't use filter because these dates are not in a single column these are in multiple columns. please help me....
    Regards,
    PRB.

    Right time to become Expert..

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need to find date from one sheet and paste in 2nd sheet

    You can use the FIND method to search the entire worksheet for the first instance of date, memorize that position as the "first", then start to build an array of all the rows that have that date, each time jumping with the FIND command until we find the "first" again. Then stop, then copy all the rows at once to a new sheet.


    Please Login or Register  to view this content.
    Dates are tricky, notice in the FIND command I formatted the date to a specific display format? The FIND needs to match the date as it is displayed on your sheet, so I hope you're consistent in that regard. Edit that part to the format that matches your display of dates.
    Last edited by JBeaucaire; 06-19-2013 at 01:45 PM. Reason: Updated with additional requirement
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need to find date from one sheet and paste in 2nd sheet

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Thanks.

  4. #4
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: Need to find date from one sheet and paste in 2nd sheet

    Hi JBeaucaire,

    Sorry for late reply, I was busy with other work. Thank you very much for your reply.
    I impressed a lot on the above code. My last question.

    in B column i will have status like "required" and "not required" I need only "required" data to be searched and copied in sheet2. what shall i add in code? Could you please advise me.

    Thanks once again.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need to find date from one sheet and paste in 2nd sheet

    I've added that into the code above, try it again.

  6. #6
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: Need to find date from one sheet and paste in 2nd sheet

    Thanks a lot JBeaucaire,

    I appreciate all your help..

  7. #7
    Forum Contributor
    Join Date
    10-22-2012
    Location
    hyd
    MS-Off Ver
    2010
    Posts
    159

    Re: Need to find date from one sheet and paste in 2nd sheet

    Hi JBeaucaire,

    I attached the excel file.

    The code you have given is not working. Could you please check...
    Sorry for asking again...
    Attached Files Attached Files

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need to find date from one sheet and paste in 2nd sheet

    My apologies, the restructuring to add in your new requirement was in error. Should work now.

    NOTE: the date 7-Jun-13 is in the wrong format and will not be found. Only dates displaying in D-MMM format will be found. This is a TEXT match on the date display.

+ 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