![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 3
|
Hi.
I'm using DATEDIF to calculate a person's age ( DATEDIF(A1,NOW(),"y"). My question is how to calculate a person's age next b'day? The condition is, if the month for the person's b'day have not passed today's month, then the age is current age. If the month have passed today's month, then add 1 to the person's age. Example:- Cell A1 : 18-Aug-1967 DATEDIF(A1,NOW(),"y") Result : 34 years Age next b'day should be 34 years as the month (Aug) have not yet reached this year. If the month as exceed today's month, then add 1 to age ( i.e 35 years ). Thanks |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Houston,Texas
Posts: 418
|
I must be missing something here. Isn't a person's age on their next birthday always 1 year more than their age now, no matter what day it is?
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
Quote:
DATEDIF(A1,NOW(),"y")+1 If, on the other hand, you want to know how old they will be THIS (calendar) YEAR, then you could try something like this: =DATEDIF(A1,NOW(),"Y")+(DATE(YEAR(NOW()),MONTH(A1),DAY(A1))>NOW()) Hope this helps, Russell |
|
|
|
|
|
|
#4 |
|
New Member
Join Date: Feb 2002
Posts: 3
|
Hi Russel, Steve.
Thanks for the tips. Actually, I wanted to set a condition whereby if the month that the person was born does not exceed the current month ( i.e Feb ), then age next b'day is 34 years. If the month birth for that person exceeds the current month, then age next b'day will be 34 + 1. I hope my explaination is clear. Thanks. |
|
|
|
|
|
#5 |
|
New Member
Join Date: Feb 2002
Posts: 3
|
Hi Russel, Steve.
Just wanted to make things clear. Example:- My b'day : 18-Aug-1967 Age as of 2002 ( current ): 34 years Since the month of August has not been exceeded yet, so my age on the next b'day will be 34 years. If I have exceeded the month of august, then my age ( next birthday ) will be 35 years. I just wanted to make a condition for the above case using the IF statement. I hope you can understand what I'm trying to say. Thanks. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|