Thread: Age Calculation
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ruic[_2_] ruic[_2_] is offline
external usenet poster
 
Posts: 5
Default Age Calculation

you need to use an IF statement:

If randomized cell isblank then do nothing else calculate age.

isblank is an actuall excel function also.

I'll leave the details to you.

"kjstec" wrote in message
...
I know how to calculate ages such as =YEAR(P327)-YEAR(D327). However, here
is my problem:

I have four columns:
One is the date of birth of the patient
Another is date patient screeded
The next is date patient randomized
The last is age at randomization

Not all patients get randomized. All patients must be screened, but I
only
want the age shown if the patient was randomized. If I copy the formula
down
the column, it also grabs the blank field in the randomized column and
returns a erroneous age. How can I fix this so that if a randomized field
is
blank, the age at randomization cell will also be blank?

Any help is greatly appreciated.

Thanks,
Kathy