Hi,
Am Wed, 7 Sep 2022 01:41:41 -0700 (PDT) schrieb Khor Kang Xian:
> Hi all, i would like to ask how to calculate age based on the year of birth, instead of birthday date? which extract from Malaysia IC number.
>
> For example :
> ic number: 161214-07-0109, the age follow birthday the result is "5" .
> if I want to follow the year of birth supposedly is "6 ".
>
> my current formula is stated as below:
> =DATEDIF(DATE(IF(LEFT($F16)="2","20",IF(LEFT($F16)="1","20",IF(LEFT($F16)="0","20","19")))&LEFT($F16,2),MID($F16,3,2),MID($F16,5,2)),TODAY(),"Y")
try:
=DATEDIF(DATEVALUE(MID(F16,5,2)&"/"&MID(F16,3,2)&"/"&IF(LEFT(F16,2)>=TEXT(TODAY(),"yy"),19,20)&LEFT(F16,2)),TODAY(),"y")
Regards
Claus B.
--
Windows10
Microsoft 365 for business