John_Mc
05-25-2006, 07:44 PM
Hi All,
I have two textboxes on a form (D.O.B1 & 2) which transfers the values to two cells. Because on transfer it updates it from 04/08/1950 (UK format) to 08/04/1950 (US format) the only solution i came up with was to ensure the cell was formated as text.
However, I now need to run the following calculation:
If DOB1 is blank, put zero here
If DOB 2 is blank, use DOB1
IF DOB1 < DOB2, use DOB1, otherwise use DOB2 (get oldest person)
My worksheet has:
L3 = DOB1 (formatted as date, but sourced using =Anotherworkbook cell that is formatted as text)
M3 = DOB2(formatted as date, but sourced using =Anotherworkbook cell that is formatted as text)
My formula is:
=IF(L3=0,"",IF(M3=0,((TODAY()-L3)/365),IF(L3<M3,((TODAY()-L3)/365),((TODAY()-M3)/365))))
But while L3 = 23/06/1915 and M3 = 01/04/1932, I am getting the answer false (when 1915 < 1932) :think:
Can anyone help or point me in the right direction?
Cheers,
John Mc
I have two textboxes on a form (D.O.B1 & 2) which transfers the values to two cells. Because on transfer it updates it from 04/08/1950 (UK format) to 08/04/1950 (US format) the only solution i came up with was to ensure the cell was formated as text.
However, I now need to run the following calculation:
If DOB1 is blank, put zero here
If DOB 2 is blank, use DOB1
IF DOB1 < DOB2, use DOB1, otherwise use DOB2 (get oldest person)
My worksheet has:
L3 = DOB1 (formatted as date, but sourced using =Anotherworkbook cell that is formatted as text)
M3 = DOB2(formatted as date, but sourced using =Anotherworkbook cell that is formatted as text)
My formula is:
=IF(L3=0,"",IF(M3=0,((TODAY()-L3)/365),IF(L3<M3,((TODAY()-L3)/365),((TODAY()-M3)/365))))
But while L3 = 23/06/1915 and M3 = 01/04/1932, I am getting the answer false (when 1915 < 1932) :think:
Can anyone help or point me in the right direction?
Cheers,
John Mc