# Age calculation

#### vishwajeet_chakravorty

##### Board Regular
Dear,
For the calculation of age I have to apply this function in D4 =DATEDIF(C4,TODAY(),"Y"). If the C4 is blank then D4 should be blank, in this situation how to modify this funtion?

### Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Dear,
For the calculation of age I have to apply this function in D4 =DATEDIF(C4,TODAY(),"Y"). If the C4 is blank then D4 should be blank, in this situation how to modify this funtion?

It's:

=IF(C4="","",DATEDIF(C4,TODAY(),"Y"))

Replies
1
Views
383
Replies
7
Views
346
Replies
3
Views
188
Replies
1
Views
206
Replies
6
Views
145

1,203,663
Messages
6,056,620
Members
444,878
Latest member
SoupLaura

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

### Which adblocker are you using?

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

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