DougStroud
Well-known Member
- Joined
- Aug 16, 2005
- Messages
- 2,968
I have a UDF for calculating age. But it is calculating incorrectly.
I entered the date of 3/4/63 and get an answer of 106, not 43.
Formula in worksheet cell is age=(3/4/63)
Any ideas of what I am doing wrong?
thanks,
ds
I entered the date of 3/4/63 and get an answer of 106, not 43.
Code:
Function Age(Birthday As Date)
Age = Int((Date - Birthday) / 365.25)
End Function
Formula in worksheet cell is age=(3/4/63)
Any ideas of what I am doing wrong?
thanks,
ds