Wikipedia:Reference desk/Archives/Computing/2018 November 14

= November 14 =

Help with an Excel formula
So, I'm working with an excel spreadsheet. In the spreadsheet I've got the birthdates of children, and I want it to put in another cell how many months from whenever now is until the child turns 18. I've constructed a formula that I think ought to work, but it's giving me a  error.

Here's what I'm trying (the kid's birthdate is in E2):

Anyone have ideas on how to make it work? ~  ONUnicorn (Talk&#124;Contribs) problem solving 19:55, 14 November 2018 (UTC)
 * Rather confusingly, DATEDIF takes the "start date" as its first parameter and "end date" as its second, so if you change the formula to =DATEDIF(TODAY,DATE(YEAR(E2)+18,MONTH(E2),DAY(E2)),"m") you should get the result you want. (You have a redundant pair of parentheses around the DATE in your first parameter, which I've removed in the corrected version). AndrewWTaylor (talk) 20:45, 14 November 2018 (UTC)
 * Yay! That works!  Thank you so much! ~  ONUnicorn (Talk&#124;Contribs) problem solving 20:49, 14 November 2018 (UTC)