+ Reply to Thread
Results 1 to 7 of 7

Search for a date

  1. #1
    Registered User
    Join Date
    08-18-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    13

    Search for a date

    What does iWs mean?
    Also, is if I want the data to go into a sheet called 'Reports', where would I write this?
    Many thanks

    Link to old thread - http://www.excelforum.com/excel-prog...ate-range.html
    Last edited by arlu1201; 08-26-2013 at 04:42 AM.

  2. #2
    Registered User
    Join Date
    08-18-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Search for a date or date range.

    Also, will this work in MS Excel 2010? I am trying to work out why it won't work for me.

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

    Re: Search for a date or date range.

    The above code is looping through all the sheets in the workbook. If you want to select only a particular sheet, you will need to change the code a bit. Do you want to use the same code as above except that it should work only in 1 sheet?
    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]

  4. #4
    Registered User
    Join Date
    08-18-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Search for a date or date range.

    Yes please - I need it to search a sheet called 'Data' and put found rows in a sheet called 'Reports' within the same Excel 2010 workbook.
    Last edited by Tim Newton; 08-26-2013 at 02:51 AM. Reason: Minor error

  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: Search for a date or date range.

    Try this
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-18-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Search for a date or date range.

    It is coming up with a bug in the last line:
    Worksheets("Data").Range("A2:P" & lrow).Copy Worksheets("Report").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)

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

    Re: Search for a date or date range.

    What is the error you are getting?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Use VBA to Search for Todays Date from an array of Date and Paste Value
    By davis6774 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2013, 07:11 PM
  2. search code-date then copy name-date-time to another sheet
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2013, 02:25 AM
  3. Search data from date to date, help me!
    By cocolucky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2012, 12:29 AM
  4. Search for a date or date range.
    By Shin278 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2011, 07:30 PM
  5. look up date, search date, return a sum
    By dribrite in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2010, 01:21 AM

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