Date Calculation

  • Thread starter Thread starter caros
  • Start date Start date
C

caros

Can anyone help.

I am trying to do a calculation in a cell based on dates.

A1 data is the person's birthdate in dd/mm/yyyy format.
B1 data is a start date
C1 data is an end date
D1 is the calculation and states "Birthday" if the month and day par
of the date in A1 is between B1 & C1. If not the field should be blan
or could state "Not Birthday".

For example
A1 = 13/04/1977
B1 = 01/04/2004
C1 = 20/04/2004
D1 result = "Birthday"

Hope this makes sense, appreciate any assistance.


Carolin
 
Hi
one way: enter the following in D1
=IF(AND(DATE(YEAR(C1),MONTH(A1),DAY(A1))>=B1,DATE(YEAR(C1),MONTH(A1),DA
Y(A1))<=C1),"Birthday","")
 
Hi Caros!

Here's one way:
=IF(AND(MONTH(A1)=MONTH(B1),MONTH(A1)=MONTH(C1),DAY(A1)>=DAY(B1),DAY(A1)<=DAY(C1)),"Birthday","No
Birthday")

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Thank you, this is excellent and does exactly what I need.

I can't believe how quickly i got a response, brilliant.

Very much appreciated.


Carolin
 
Hi Caros!

Always pleased to help and thanks shows Google searchers that the
answer works.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top