+ Reply to Thread
Results 1 to 2 of 2

Copy rows but within date range only

  1. #1
    Registered User
    Join Date
    03-23-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    1

    Red face Copy rows but within date range only

    Hi. Im a bit stuck on how to attack this problem in vba and im sure someone has a basic solution for this:

    In Sheet1, I have A1: Start Date and A2: End Date
    In Sheet2, is the look up sheet. Its sorted by ColumnA:
    ColumnA.......ColumnB.....ColumnC...ColumnD
    01/02/2008...James........20...........$200
    05/02/2008...Jones .......10...........$800
    06/02/2008...Mary.........30...........$900
    06/02/2008...Bob...........50...........$600
    07/02/2008...Jason........10...........$500
    08/02/2008...Jackie........20...........$400
    etc
    etc

    I wanted to create a button/vba in Sheet1 that will copy the entire row of data in Sheet2 but only within the date range declared in Sheet1. and place the copied row in Sheet1 starting at position A100.

    Eg.
    Start Date: 05/02/2008
    End Date: 07/02/2008
    Click button(vba executes)
    Copy all rows from lookup sheet2 within these dates and paste it in Sheet1 A100.

    Any solution will be very much appreciated.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Copy rows but within date range only

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

    I would think that a PivotTable might be a good approach
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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