# Age Help

##### New Member
Everone one is so very helpful here.

I have another issue I need help with.

cell A1 contains their birthday. I want cell A2 to contain their age as of today.

If A1 is blank then I want A2 to remain blank. Thus there is no age calucation until a birthday is entered into A1.

The age can be simple just the year.

Again thanks everyone for your help. This is a great place.

### Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

#### mhenk

##### Well-known Member
Probably way too complicated, but this is the first one of mine that I came across:
Code:
``=YEAR(\$D\$8)-YEAR(\$D\$18)-IF(MONTH(\$D\$8)<MONTH(\$D\$18),1,0)-IF(AND(MONTH(\$D\$8)=MONTH(\$D\$18),DAY(\$D\$8)<DAY(\$D\$18)),1,0)``
D8 is the birthday, D18 is the evaluation day, can be changed to now(), probably.

Strap an if statement on there and you're good to go

#### facethegod

##### Well-known Member
Try this.... age is based on 30 day months w/ a 360 day year

Code:
``=IF(A1="","",(YEAR(TODAY())-YEAR(A1))+IF(DAY(TODAY())<DAY(A1),MONTH(TODAY())-1-MONTH(A1),MONTH(TODAY())-MONTH(A1))/12+IF(DAY(TODAY())<DAY(A1),30+DAY(TODAY())-DAY(A1),DAY(TODAY())-DAY(A1))/360)``

##### New Member
The age calucation is the easy part

=DATEDIF(L14,NOW(),"y")

What I dont know how to acomplish is if cell L14 is empty I do not want a date in cell M14.

Anyt thoughts

#### Joe Was

##### MrExcel MVP
=If(L14="","",DATEDIF(L14,NOW(),"y"))

#### VoG

##### Legend
Try

=IF(ISBLANK(L14),"",DATEDIF(L14,NOW(),"y"))

#### Traveler

##### Board Regular
The age can be simple just the year.
Code:
``=IF(A1="","",YEAR(TODAY())-YEAR(A1))``
make sure you format the cell as General. Excel tries to be helpful and changes the format to Date when it sees such things as dates in the formula.

#### brian.wethington

##### Well-known Member
The age can be simple just the year.
Code:
``=IF(A1="","",YEAR(TODAY())-YEAR(A1))``
make sure you format the cell as General. Excel tries to be helpful and changes the format to Date when it sees such things as dates in the formula.
what about if they have not had their birthday yet this year?

As for your other part, the datedif functions work fine to get the age... this will get your if portion taken care of

=if(A1, FunctionHere, "")

Replies
8
Views
306
Replies
7
Views
1K
Replies
6
Views
229
Replies
0
Views
568
Replies
1
Views
347

1,190,876
Messages
5,983,355
Members
439,840
Latest member
billy1989

### 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?

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