find a value in multiple rows

pedram

New Member
Joined
Aug 12, 2014
Messages
27
Hi All this is my problem...


nameleave startleave endleave one day only
smith
2/8/146/8/14
bob
paul
smith9/10/1414/10/14
john
paul3/9/14
smith8/12/1414/12/14
bob5/12/148/12/14
jack

<tbody>
</tbody>

the above table is a small sample of a much bigger table.
I would like to have a formula that answers these questions.. ( they are just examples of dates , i hope to be able to use any date in the year)

Is smith on leave on the 10/12/14 ? True
Is Paul on leave on 3/9/14 ? True
Is bob on leave on 10/12/14 ? false

Your help would be appreciated.
 

Some videos you may like

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

wigi

Well-known Member
Joined
Jul 10, 2006
Messages
7,958
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hello

If you put the table in A1:D10, the name in cell G1 and the date in cell H1, this works:

=SUM((A2:A10=G1)*(B2:B10+D2:D10<=H1)*(C2:C10+D2:D10>=H1))>0

You need to press Ctrl-Shif-Enter instead of Enter, to confirm the formula. It's an array formula.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,385
Messages
5,601,329
Members
414,445
Latest member
walramgo02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top