+ Reply to Thread
Results 1 to 4 of 4

Formulas

  1. #1
    chedd via OfficeKB.com
    Guest

    Formulas

    =IF(MONTH(TODAY())>MONTH(E21),YEAR(TODAY())-YEAR(A1),
    IF(AND(MONTH(TODAY())=MONTH(E21),DAY(TODAY())>=DAY(E21)),
    YEAR(TODAY())-YEAR(E21),(YEAR(TODAY())-YEAR(E21))-1))

    The formula above works out the age of a person once i put their birth date
    into another column attached to the formula. The only problem i am having is
    I am requiring a zero value in the blank cells, but the blank cells keep
    showing a fig of 106. Can anyone help in the above formula to show a zero
    value until the birth date is asigned.

    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...tions/200605/1

  2. #2
    Max
    Guest

    Re: Formulas

    Perhaps just add a simple error trap in front to check for the dependent
    cells A1 and E21 being empty: =IF(OR(A1="",E21=""),0,your_formula)
    viz.:
    =IF(OR(A1="",E21=""),0,IF(MONTH(TODAY())>MONTH(E21),YEAR(TODAY())-YEAR(A1),IF(AND(MONTH(TODAY())=MONTH(E21),DAY(TODAY())>=DAY(E21)),YEAR(TODAY())-YEAR(E21),(YEAR(TODAY())-YEAR(E21))-1)))
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---
    "chedd via OfficeKB.com" wrote:
    > =IF(MONTH(TODAY())>MONTH(E21),YEAR(TODAY())-YEAR(A1),
    > IF(AND(MONTH(TODAY())=MONTH(E21),DAY(TODAY())>=DAY(E21)),
    > YEAR(TODAY())-YEAR(E21),(YEAR(TODAY())-YEAR(E21))-1))
    >
    > The formula above works out the age of a person once i put their birth date
    > into another column attached to the formula. The only problem i am having is
    > I am requiring a zero value in the blank cells, but the blank cells keep
    > showing a fig of 106. Can anyone help in the above formula to show a zero
    > value until the birth date is asigned.
    >
    > --
    > Message posted via OfficeKB.com
    > http://www.officekb.com/Uwe/Forums.a...tions/200605/1
    >


  3. #3
    chedd via OfficeKB.com
    Guest

    Re: Formulas

    Max wrote:
    >Perhaps just add a simple error trap in front to check for the dependent
    >cells A1 and E21 being empty: =IF(OR(A1="",E21=""),0,your_formula)
    >viz.
    >=IF(OR(A1="",E21=""),0,IF(MONTH(TODAY())>MONTH(E21),YEAR(TODAY())-YEAR(A1),IF(AND(MONTH(TODAY())=MONTH(E21),DAY(TODAY())>=DAY(E21)),YEAR(TODAY())-YEAR(E21),(YEAR(TODAY())-YEAR(E21))-1)))
    >> =IF(MONTH(TODAY())>MONTH(E21),YEAR(TODAY())-YEAR(A1),
    >> IF(AND(MONTH(TODAY())=MONTH(E21),DAY(TODAY())>=DAY(E21)),

    >[quoted text clipped - 5 lines]
    >> showing a fig of 106. Can anyone help in the above formula to show a zero
    >> value until the birth date is asigned.



    Thank you for you help in this and i have managed to sort out my report.

    Again thank you

    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...tions/200605/1

  4. #4
    Max
    Guest

    Re: Formulas

    Glad it helped !
    Thanks for the feedback ..
    --
    Max
    Singapore
    http://savefile.com/projects/236895
    xdemechanik
    ---
    "chedd via OfficeKB.com" wrote:
    > Thank you for you help in this and i have managed to sort out my report.
    > Again thank you


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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