简体   繁体   中英

Excel matching cell value and date range

i'm working on some data checking and faced problem to ease my checking. Hope anyone here can help me

I've two sheet of data

Sheet 1

  1. John 01.10.2017 10.10.2017 A
  2. Chloe 10.10.2017 10.10.2017 B
  3. Jess 20.11.2017 22.11.2017 C
  4. John 12.10.2017 13.10.2017 D

Sheet 2

  1. Name Date Result
  2. John 01.10.2017 A
  3. John 11.10.2017 #N/A
  4. Chloe 10.10.2017 B

I need a formula to cater on Sheet 2, result column. If sheet 2 name with date fall/collision in btw sheet 1 date range, excel could help show the result note that name on sheet 1 maybe repeated with different date range, but sheet 2 i wish to check the name whether conllision with sheet 1 data

Appreciate if anyone can help

First you need to format your dates properly. Format them as date times etc.

Then in the sheet 2 results column have a function something like this:

=IF(AND(A1=Sheet1!A1, B1>=Sheet1!B1, B1<=Sheet1!C1),TRUE,FALSE)

This will return TRUE for John for instance.

You then extend this for the rest of your cases.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM