#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default DateDif Problem

I will try my best to explain myself. I have a worksheet in which cell A1:A6
contain Date of Birth, Cell B1:B6 contain the age by using =DateDiff(A1,
Now(), "Y") and finally I have a question that asks if there is anyone =65
(years old), this question is an if, or statement. The issue is that when a
cell in A1:A6 is blank the corresponding cell in column B returns a 106.
Therefore my question always returns a "Yes" becuase if any cell in A1:A6 is
blank I will get a 106.
I would like to find a way to make this work. Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default DateDif Problem

It's hard to say without seeing the formula, but you just need to test the A
value for blank.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Pattyt" wrote in message
...
I will try my best to explain myself. I have a worksheet in which cell

A1:A6
contain Date of Birth, Cell B1:B6 contain the age by using =DateDiff(A1,
Now(), "Y") and finally I have a question that asks if there is anyone
=65
(years old), this question is an if, or statement. The issue is that when

a
cell in A1:A6 is blank the corresponding cell in column B returns a 106.
Therefore my question always returns a "Yes" becuase if any cell in A1:A6

is
blank I will get a 106.
I would like to find a way to make this work. Any suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,939
Default DateDif Problem

Change your datedif formula to this...

=IF(A1=0, 0, DATEDIF(A1, NOW(),"Y"))

Which will avoid the 106 (number of years elapsed since 1900)
--
HTH...

Jim Thomlinson


"Pattyt" wrote:

I will try my best to explain myself. I have a worksheet in which cell A1:A6
contain Date of Birth, Cell B1:B6 contain the age by using =DateDiff(A1,
Now(), "Y") and finally I have a question that asks if there is anyone =65
(years old), this question is an if, or statement. The issue is that when a
cell in A1:A6 is blank the corresponding cell in column B returns a 106.
Therefore my question always returns a "Yes" becuase if any cell in A1:A6 is
blank I will get a 106.
I would like to find a way to make this work. Any suggestions?

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
Importing from Excel Sheet Problem workerboy Excel Discussion (Misc queries) 0 August 18th 06 02:44 PM
Excel Startup Problem aussievic Excel Discussion (Misc queries) 1 June 12th 06 04:33 PM
Problem with MS Community Newsgroups? [email protected] Excel Discussion (Misc queries) 4 May 14th 06 04:38 PM
Urgent Help Required on Excel Macro Problem Sachin Shah Excel Discussion (Misc queries) 1 August 17th 05 06:26 AM
Freeze Pane problem in shared workbooks JM Excel Discussion (Misc queries) 1 February 1st 05 12:04 AM


All times are GMT +1. The time now is 04:26 PM.

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

About Us

"It's about Microsoft Excel"