1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Ignoring Black Cells in Age Calculation

Discussion in 'Business Applications' started by artari, Mar 19, 2009.

Thread Status:
Not open for further replies.
  1. artari

    artari Thread Starter

    Joined:
    Mar 19, 2009
    Messages:
    5
    Hi

    I have set up a formula to calculate people's ages from their date of birth which works really well. This is the formula i used =INT((TODAY()-F4)/365.25).

    I have copied the formula across hundreds of rows and the problem is when the Date of Birth cell is empty. How do i get Excel to ignore the empty cells in the calculation.

    thanks for your help.
     
  2. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Welcome to the board.

    Use DATEDIF instead of what you have. So:

    =IF(F4="","",DATEDIF(F4,TODAY(),"y"))
     
  3. artari

    artari Thread Starter

    Joined:
    Mar 19, 2009
    Messages:
    5
    Hi

    thanks for that. It works brilliantly!!
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/810721

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice