Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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(TODA Y())=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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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(E2 1),YEAR(TODAY())-YEAR(A1),IF(AND(MONTH(TODAY())=MONTH(E21),DAY(TODA Y())=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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to change column letters to correct ones in many formulas automatically? | Links and Linking in Excel | |||
how can i get formulas in excel to copy and paste? | Excel Worksheet Functions | |||
How to make Excel run limited number of formulas on a given worksh | Excel Discussion (Misc queries) | |||
Way to make Excel only run certain formulas on a worksheet? | Excel Discussion (Misc queries) | |||
calculating formulas for all workbooks in a folder | Excel Worksheet Functions |