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(),quot;yquot;)
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.
Try:
=IF(C2=quot;quot;,quot;quot;,DATEDIF(C2,TODAY(),quot;yquot;))
Regards
Jean-Guy
quot;Millerkquot; wrote:
gt; Excel Experts,
gt;
gt; I currently have a worksheet that list people's DOB and then list their age
gt; in the next cell. I've copied all my formulas to include 10 extra lines so
gt; additional people can be added without having to copy the formula down. The
gt; person's DOB is listed in C and their age in D. The formula I'm using in D
gt; is
gt;
gt; =DATEDIF(C2,NOW(),quot;yquot;)
gt;
gt; This formula works great, except in the extra rows, it produces an outcome
gt; of 106. I'd like for the cell to remain blank if there isn't a DOB listed in
gt; row C.
gt;
gt; Hope this question makes sense and thanks for any help provided.
Thanks, works like a charm.
quot;pinmasterquot; wrote:
gt; Try:
gt;
gt; =IF(C2=quot;quot;,quot;quot;,DATEDIF(C2,TODAY(),quot;yquot;))
gt;
gt; Regards
gt;
gt; Jean-Guy
gt;
gt; quot;Millerkquot; wrote:
gt;
gt; gt; Excel Experts,
gt; gt;
gt; gt; I currently have a worksheet that list people's DOB and then list their age
gt; gt; in the next cell. I've copied all my formulas to include 10 extra lines so
gt; gt; additional people can be added without having to copy the formula down. The
gt; gt; person's DOB is listed in C and their age in D. The formula I'm using in D
gt; gt; is
gt; gt;
gt; gt; =DATEDIF(C2,NOW(),quot;yquot;)
gt; gt;
gt; gt; This formula works great, except in the extra rows, it produces an outcome
gt; gt; of 106. I'd like for the cell to remain blank if there isn't a DOB listed in
gt; gt; row C.
gt; gt;
gt; gt; Hope this question makes sense and thanks for any help provided.
I can't write the formula for you, but what you need is another IF function
showing that if the cell in column C is greater than 0, to run the formula
you supplied, and to make no entry if blank--something like
=IF(C5gt;0,[formula]).
quot;Millerkquot; gt; wrote in message
...
gt; Excel Experts,
gt;
gt; I currently have a worksheet that list people's DOB and then list their
gt; age
gt; in the next cell. I've copied all my formulas to include 10 extra lines
gt; so
gt; additional people can be added without having to copy the formula down.
gt; The
gt; person's DOB is listed in C and their age in D. The formula I'm using in
gt; D
gt; is
gt;
gt; =DATEDIF(C2,NOW(),quot;yquot;)
gt;
gt; This formula works great, except in the extra rows, it produces an outcome
gt; of 106. I'd like for the cell to remain blank if there isn't a DOB listed
gt; in
gt; row C.
gt;
gt; Hope this question makes sense and thanks for any help provided.
- Mar 09 Fri 2007 20:36
Leave cell blank if no data
close
全站熱搜
留言列表
發表留言