Wikipedia:Reference desk/Archives/Computing/2018 November 14
Appearance
Computing desk | ||
---|---|---|
< November 13 | << Oct | November | Dec >> | Current desk > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
November 14
[edit]Help with an Excel formula
[edit]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 #NUM!
error.
Here's what I'm trying (the kid's birthdate is in E2): =DATEDIF((DATE(YEAR(E2)+18,MONTH(E2),DAY(E2))),TODAY(),"m")
Anyone have ideas on how to make it work? ~ ONUnicorn(Talk|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|Contribs)problem solving 20:49, 14 November 2018 (UTC)