Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 208
Default Error message needed if incorrect Date Of Birth (DOB) entered

Hi,
In cell D6 I have a DOB entered....in cell E6 I have a datedif function that
has 3 conditional formatting set as:

1 - If D6 is blank, E6 is blank.
2 - If DOB in D6 is between 18 - 24 then E6 shows age and cell is yellow.
3 - If DOB in D6 is 25 or over then E6 shows age and cell is blue.

What I need is when a DOB is entered in D6 under 16 years old, then D6
returns an error message -" You have Entered an Age under 16 Years - Retry!!
".
I have tried Data Validation, but cant get a message from tha as I dont know
what to set as the date validation.

I do need any 16 or 17 year olds to show as they are included in my customer
age range so they can stay white background.

If there is vba code for this then more than happy to try that as am slowly
trying to lean as much as I can

Any ideas??

Thanks in anticipation

My datedif formula is: =IF(D6="","",DATEDIF(D6,TODAY(),"Y"))


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 703
Default Error message needed if incorrect Date Of Birth (DOB) entered

On 26 Jan., 22:37, Craig wrote:
Hi,
In cell D6 I have a DOB entered....in cell E6 I have a datedif function that
has 3 *conditional formatting set as:

1 - If D6 is blank, E6 is blank.
2 - If DOB in D6 is between 18 - 24 then E6 shows age and cell is yellow.
3 - If DOB in D6 is 25 or over then E6 shows age and cell is blue.

What I need is when a DOB is entered in D6 under 16 years old, then D6
returns an error message -" You have Entered an Age under 16 Years - Retry!!
".
I have tried Data Validation, but cant get a message from tha as I dont know
what to set as the date validation.

I do need any 16 or 17 year olds to show as they are included in my customer
age range so they can stay white background.

If there is vba code for this then more than happy to try that as am slowly
trying to lean as much as I can

Any ideas??

Thanks in anticipation

My datedif formula is: =IF(D6="","",DATEDIF(D6,TODAY(),"Y"))


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 703
Default Error message needed if incorrect Date Of Birth (DOB) entered

Sorry, hit the wrong key...

Select D6 and goto Data Validation Allow: Custom Formula: =DATEDIF
(D6,TODAY(),"Y")=16

Set up your error message in the 'Error Alert' tab.

Regards,
Per

On 27 Jan., 00:23, Per Jessen wrote:
On 26 Jan., 22:37, Craig wrote:



Hi,
In cell D6 I have a DOB entered....in cell E6 I have a datedif function that
has 3 *conditional formatting set as:


1 - If D6 is blank, E6 is blank.
2 - If DOB in D6 is between 18 - 24 then E6 shows age and cell is yellow.
3 - If DOB in D6 is 25 or over then E6 shows age and cell is blue.


What I need is when a DOB is entered in D6 under 16 years old, then D6
returns an error message -" You have Entered an Age under 16 Years - Retry!!
".
I have tried Data Validation, but cant get a message from tha as I dont know
what to set as the date validation.


I do need any 16 or 17 year olds to show as they are included in my customer
age range so they can stay white background.


If there is vba code for this then more than happy to try that as am slowly
trying to lean as much as I can


Any ideas??


Thanks in anticipation


My datedif formula is: =IF(D6="","",DATEDIF(D6,TODAY(),"Y"))- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 208
Default Error message needed if incorrect Date Of Birth (DOB) entered

Thanks Per,

Did as instructed but get the error message when any DOB entered...did try
changing the in the formula to < and back again - no luck.

I copied and cross checked your formula to ensure I hadnt made an error!

Any ideas

Thanks

"Per Jessen" wrote:

Sorry, hit the wrong key...

Select D6 and goto Data Validation Allow: Custom Formula: =DATEDIF
(D6,TODAY(),"Y")=16

Set up your error message in the 'Error Alert' tab.

Regards,
Per

On 27 Jan., 00:23, Per Jessen wrote:
On 26 Jan., 22:37, Craig wrote:



Hi,
In cell D6 I have a DOB entered....in cell E6 I have a datedif function that
has 3 conditional formatting set as:


1 - If D6 is blank, E6 is blank.
2 - If DOB in D6 is between 18 - 24 then E6 shows age and cell is yellow.
3 - If DOB in D6 is 25 or over then E6 shows age and cell is blue.


What I need is when a DOB is entered in D6 under 16 years old, then D6
returns an error message -" You have Entered an Age under 16 Years - Retry!!
".
I have tried Data Validation, but cant get a message from tha as I dont know
what to set as the date validation.


I do need any 16 or 17 year olds to show as they are included in my customer
age range so they can stay white background.


If there is vba code for this then more than happy to try that as am slowly
trying to lean as much as I can


Any ideas??


Thanks in anticipation


My datedif formula is: =IF(D6="","",DATEDIF(D6,TODAY(),"Y"))- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Error message needed if incorrect Date Of Birth (DOB) entered

The formula is correct and works for me. Are you sure that you've entered a
valid Excel date, and not text?
--
David Biddulph

"Craig" wrote in message
...
Thanks Per,

Did as instructed but get the error message when any DOB entered...did try
changing the in the formula to < and back again - no luck.

I copied and cross checked your formula to ensure I hadnt made an error!

Any ideas

Thanks

"Per Jessen" wrote:

Sorry, hit the wrong key...

Select D6 and goto Data Validation Allow: Custom Formula: =DATEDIF
(D6,TODAY(),"Y")=16

Set up your error message in the 'Error Alert' tab.

Regards,
Per

On 27 Jan., 00:23, Per Jessen wrote:
On 26 Jan., 22:37, Craig wrote:



Hi,
In cell D6 I have a DOB entered....in cell E6 I have a datedif
function that
has 3 conditional formatting set as:

1 - If D6 is blank, E6 is blank.
2 - If DOB in D6 is between 18 - 24 then E6 shows age and cell is
yellow.
3 - If DOB in D6 is 25 or over then E6 shows age and cell is blue.

What I need is when a DOB is entered in D6 under 16 years old, then
D6
returns an error message -" You have Entered an Age under 16 Years -
Retry!!
".
I have tried Data Validation, but cant get a message from tha as I
dont know
what to set as the date validation.

I do need any 16 or 17 year olds to show as they are included in my
customer
age range so they can stay white background.

If there is vba code for this then more than happy to try that as am
slowly
trying to lean as much as I can

Any ideas??

Thanks in anticipation

My datedif formula is: =IF(D6="","",DATEDIF(D6,TODAY(),"Y"))- Skjul
tekst i anførselstegn -

- Vis tekst i anførselstegn -


.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 208
Default Error message needed if incorrect Date Of Birth (DOB) entered

David & Per,

My apologies.....I attempted the validation before I left for work this
morning - mistake....got into work and tried again and perfect....Boss happy
and looking for more stuff - dont they always !!!!

thank you Per and thank you David for taking time to read post

Craig

"David Biddulph" wrote:

The formula is correct and works for me. Are you sure that you've entered a
valid Excel date, and not text?
--
David Biddulph

"Craig" wrote in message
...
Thanks Per,

Did as instructed but get the error message when any DOB entered...did try
changing the in the formula to < and back again - no luck.

I copied and cross checked your formula to ensure I hadnt made an error!

Any ideas

Thanks

"Per Jessen" wrote:

Sorry, hit the wrong key...

Select D6 and goto Data Validation Allow: Custom Formula: =DATEDIF
(D6,TODAY(),"Y")=16

Set up your error message in the 'Error Alert' tab.

Regards,
Per

On 27 Jan., 00:23, Per Jessen wrote:
On 26 Jan., 22:37, Craig wrote:



Hi,
In cell D6 I have a DOB entered....in cell E6 I have a datedif
function that
has 3 conditional formatting set as:

1 - If D6 is blank, E6 is blank.
2 - If DOB in D6 is between 18 - 24 then E6 shows age and cell is
yellow.
3 - If DOB in D6 is 25 or over then E6 shows age and cell is blue.

What I need is when a DOB is entered in D6 under 16 years old, then
D6
returns an error message -" You have Entered an Age under 16 Years -
Retry!!
".
I have tried Data Validation, but cant get a message from tha as I
dont know
what to set as the date validation.

I do need any 16 or 17 year olds to show as they are included in my
customer
age range so they can stay white background.

If there is vba code for this then more than happy to try that as am
slowly
trying to lean as much as I can

Any ideas??

Thanks in anticipation

My datedif formula is: =IF(D6="","",DATEDIF(D6,TODAY(),"Y"))- Skjul
tekst i anførselstegn -

- Vis tekst i anførselstegn -

.



.

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
Create error message if number entered is greater than previous ce Joe Lewis Excel Discussion (Misc queries) 2 July 25th 08 01:59 AM
#VALUE! error message help needed please Bob Newman Excel Worksheet Functions 3 November 25th 07 04:56 PM
How to give an error message if a cell value entered is larger than permitted Colin Hayes Excel Discussion (Misc queries) 7 May 16th 07 02:39 PM
Inserting current date when number entered in cell & Circular reference error? Pheasant Plucker® Excel Discussion (Misc queries) 4 April 10th 07 10:39 AM
formula to calculate age using birth date and current date lalah Excel Worksheet Functions 2 November 20th 05 10:51 PM


All times are GMT +1. The time now is 06:59 AM.

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"