Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Millerk
 
Posts: n/a
Default Leave cell blank if no data

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.
  #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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Millerk
 
Posts: n/a
Default Leave cell blank if no data

Thanks, works like a charm.

"pinmaster" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Richard O. Neville
 
Posts: n/a
Default Leave cell blank if no data

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(C50,[formula]).

"Millerk" wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
how do you force the cell to leave the data as you type it? Amanda Excel Discussion (Misc queries) 2 July 20th 05 02:59 PM
How can I blank a cell until a ref cell has the correct data? force530 Excel Discussion (Misc queries) 1 May 19th 05 09:06 PM
blank cell turns to 0 LMB New Users to Excel 2 April 25th 05 03:57 PM


All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"