+ Reply to Thread
Results 1 to 3 of 3

Convert Formula

  1. #1
    Registered User
    Join Date
    04-07-2020
    Location
    Fairbanks, Alaska
    MS-Off Ver
    Professional Plus 2016
    Posts
    1

    Convert Formula

    I am trying to calculate a person's age today (in H2) by entering their date of birth (in G2), however all blank DOB cells produce a number in the targeted cell.

    Can somebody please help me convert this formula to display a blank cell if no date is entered?

    =DATEDIF(G2,NOW(),"y")

    Thanks!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,418

    Re: Convert Formula

    Welcome to the forum.

    Try this:

    =IF(G2="","",DATEDIF(G2,NOW(),"y"))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,418

    Re: Convert Formula

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. [SOLVED] Convert formula to VBA code without viewing the formula in Cell
    By KumarPK in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-24-2016, 11:02 AM
  2. Replies: 8
    Last Post: 09-29-2016, 08:21 AM
  3. Convert Cell Formula to Convert Text to VBA Code
    By PY_ in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-08-2014, 05:51 PM
  4. Formula as text in cell -> convert to formula result
    By AHFoddeR in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-12-2013, 02:00 AM
  5. [SOLVED] Need to Convert Formula R1C1 into A1-style but the Formula String exceeds 255 characters
    By VBA_Gary in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-04-2012, 12:09 PM
  6. Replies: 3
    Last Post: 05-18-2010, 06:14 AM
  7. [SOLVED] how to convert a formula into text in order to display the formula
    By Claudio Hartzstein in forum Excel General
    Replies: 2
    Last Post: 07-13-2006, 05:05 AM

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