+ Reply to Thread
Results 1 to 2 of 2

Conditional First and Last Dates

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1

    Conditional First and Last Dates

    I have a worksheet containing contact dates for a list of supporters. I am trying to, in a separate worksheet, list the first and last dates that each supporter was contacted. So the source worksheet looks something like this:

    id name date
    11 Bob Smith 1/1/2007
    11 Bob Smith 2/1/2007
    12 Jane Jones 3/1/2007
    12 Jane Jones 4/1/2007
    12 Jane Jones 5/1/2007

    And the destination worksheet has the following column headings

    id name first date last date

    I feel that I should be able to somehow conditionally use the id fields to fill in the first and last dates, but can't seem to get the formula right. I realize that the formula is complicated by the fact that the source data and the destination cells are on two different worksheets, but that is the way it has to be.

    Any help would be greatly appreciated.
    Last edited by Marlow; 05-09-2012 at 06:09 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Conditional First and Last Dates

    if every instance of the name has the start date 1st and the end date 2nd, try this little trick. add a helper column to your data sheet in column A (you can hide it laater if you want) and concatenate the name and date...=A1&B1. then in your "reference" sheet, do a vlookup on that helper column...

    =vlookup(name&date,range-of-your-data,column-of-the-data-you-want-to-return,false) the false is for unsorted data)

    if this isnt working for you, i would suggest you upload as sample for us to work with?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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