+ Reply to Thread
Results 1 to 2 of 2

Date of Birth/Age/Today's Date and Blank Cells

  1. #1
    Registered User
    Join Date
    03-12-2014
    Location
    california
    MS-Off Ver
    Excel 2013
    Posts
    2

    Date of Birth/Age/Today's Date and Blank Cells

    I'm creating a template for customers to fill out and need to display their age when given their date of birth. I'm using the formula =DATEDIF(A1,TODAY(),"y") and it's working fine, but I I want to leave cells blank if no date of birth is provided. For example, there are cells to fill in up to six children, if they only have two I want 3 through 6 to remain blank. Any suggestions?

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Date of Birth/Age/Today's Date and Blank Cells

    Hello,

    you can wrap the formula in an IF statement. Assuming that the birthday of the child is entered in cell A1, use

    =if(isnumber(A1),DATEDIF(A1,TODAY(),"y"),"")

    The formula will only calculate the age if A1 contains a number (a date is a number in Excel).

    cheers, teylyn

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formula to Count Consecutive Blank Cells in a Range Depending on Today's Date
    By tophatpete in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-28-2020, 05:12 AM
  2. Replies: 2
    Last Post: 11-03-2014, 10:29 AM
  3. Work out Term of Birth by Date of Birth
    By sezza79 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2014, 11:06 AM
  4. [SOLVED] Count blank cells up to today's date
    By LHOWE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-24-2014, 11:53 AM
  5. Replies: 4
    Last Post: 09-12-2013, 11:32 PM
  6. Converting Date of Birth to 'Term of Birth'
    By Kungfusal in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2009, 04:12 AM
  7. Replies: 1
    Last Post: 07-26-2005, 04:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1