View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default Leave cell blank if no data

Try:

=IF(C2="","",DATEDIF(C2,TODAY(),"y"))

Regards

Jean-Guy

"Millerk" wrote:

Excel Experts,

I currently have a worksheet that list people's DOB and then list their age
in the next cell. I've copied all my formulas to include 10 extra lines so
additional people can be added without having to copy the formula down. The
person's DOB is listed in C and their age in D. The formula I'm using in D
is

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

This formula works great, except in the extra rows, it produces an outcome
of 106. I'd like for the cell to remain blank if there isn't a DOB listed in
row C.

Hope this question makes sense and thanks for any help provided.