+ Reply to Thread
Results 1 to 2 of 2

Match A Date Within A Date Range In Another Sheet

  1. #1
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    49

    Thumbs up Match A Date Within A Date Range In Another Sheet

    Please can somebody help me.

    I have a workbook that contains 2 sheets.

    In sheet1 and column A there is a date and time and in sheet2 columns A and B a from and to date and time.

    There are a number of rows in each sheet.

    I would like a formula that searches sheet2 and puts a 1 in sheet1 column B where the value finds a match between the to and from date and time in sheet2 for every match it finds.

    Thank you.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Match A Date Within A Date Range In Another Sheet

    hi AlexRoberts. a sample excel file with manually typed results you want to see always helps. see if the attached is what you need.

    assuming data of sheet2 in A2:B20, then:
    =SUMPRODUCT((Sheet2!$A$2:$A$20<=A2)*(Sheet2!$B$2:$B$20>=A2))

    the above counts the number of times the date & time occurs between the ranges. if you just want 1 shown when it occurs, then:
    =IF(SUMPRODUCT((Sheet2!$A$2:$A$20<=A2)*(Sheet2!$B$2:$B$20>=A2)),1,"")

    and if you could update your profile with the latest MS off ver you have (assuming you haven't), that will help us give you the newer & more efficient formulas. in excel 2007 & above, you can use COUNTIFS:
    =COUNTIFS(Sheet2!$A$2:$A$20,"<="&A2,Sheet2!$B$2:$B$20,">="&A2)
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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. [SOLVED] reference date time range, return the value into all cell that match datetime range
    By Jarvco13 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-22-2013, 10:39 PM
  2. [SOLVED] Date in Consolidated sheet does not match date in sheets being consolidated
    By Lowtech in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-15-2012, 07:23 PM
  3. Replies: 5
    Last Post: 01-07-2012, 10:17 AM
  4. [SOLVED] Match date range reffering to a specific date
    By Ramzes in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-02-2010, 09:22 AM
  5. Match the date on the graph with the date on the sheet.
    By RossPaterson in forum Excel General
    Replies: 2
    Last Post: 04-17-2009, 08:52 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