ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   formula (https://www.excelbanter.com/excel-discussion-misc-queries/183996-formula.html)

Penny

formula
 
I need a formula that will allow me to calculate how many days to next
birthday.

AKphidelt

formula
 
Use the TODAY() formula

So if you have a birthdate say 06/28/2008 in cell A1

In cell B1 type the formula

=A1-TODAY()

Then make sure you change cell B1s format to General

"penny" wrote:

I need a formula that will allow me to calculate how many days to next
birthday.


APS

formula
 
What if the date of birth is in the past?
For example if the DOB is 1/30 and today is 6/5 then it displays -127. How
do I get it to calculate how many days until 1/30 of next year?

"akphidelt" wrote:

Use the TODAY() formula

So if you have a birthdate say 06/28/2008 in cell A1

In cell B1 type the formula

=A1-TODAY()

Then make sure you change cell B1s format to General

"penny" wrote:

I need a formula that will allow me to calculate how many days to next
birthday.


Don Guillett

formula
 
Wouldn't DOB always be in the past??
Try the DATEDIFF formula

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"APS" wrote in message
...
What if the date of birth is in the past?
For example if the DOB is 1/30 and today is 6/5 then it displays -127.
How
do I get it to calculate how many days until 1/30 of next year?

"akphidelt" wrote:

Use the TODAY() formula

So if you have a birthdate say 06/28/2008 in cell A1

In cell B1 type the formula

=A1-TODAY()

Then make sure you change cell B1s format to General

"penny" wrote:

I need a formula that will allow me to calculate how many days to next
birthday.



APS

formula
 
I was referring to the MM/DD portion of the date.
In the previous example I would like it to return 238 or 239 (depending on
Leap Year), instead of -127.

I think I got it, but I don't know how to do it w/o creating column D.
=IF(D2<TODAY(),SUM(D2-(TODAY()-365)),SUM(D2-TODAY()))

Given the following:
D2=this years birthday (ex: DOB=1/30/99, then D3=1/30/08)
----------------------=DATE(YEAR(TODAY()),MONTH(A2),DAY(A2))
A2=DOB

"Don Guillett" wrote:

Wouldn't DOB always be in the past??
Try the DATEDIFF formula

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"APS" wrote in message
...
What if the date of birth is in the past?
For example if the DOB is 1/30 and today is 6/5 then it displays -127.
How
do I get it to calculate how many days until 1/30 of next year?

"akphidelt" wrote:

Use the TODAY() formula

So if you have a birthdate say 06/28/2008 in cell A1

In cell B1 type the formula

=A1-TODAY()

Then make sure you change cell B1s format to General

"penny" wrote:

I need a formula that will allow me to calculate how many days to next
birthday.





All times are GMT +1. The time now is 07:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com