Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to use formula to decide when to apply TIME data validation

Hi!

I am trying to set up a spreadsheet where I use data validation to restrict
certain cells to only allow times within a specified range (e.g., 7:00AM to
6:00PM) but ONLY when another cell (A11) contains "DAY SHIFT". If that other
cell (A11) does NOT contain "DAY SHIFT" then I want the validated cells to
still allow only times to be entered but to allow ANY time to be entered.

Is there a way to set this up? I can't see how to restrict when the data
validation occurs when the restrictions are based on TIME.

Thanks so much for any insight you can give!!

Barbara
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How to use formula to decide when to apply TIME data validation

Assuming that only times will be entered...

Try this...

Select the cell to validate. Let's assume this is cell B11.
Goto DataValidation
Allow: Custom
Formula:

=IF(A11="day
shift",AND(B11=TIME(7,0,0),B11<=TIME(18,0,0)),AND (B11=0,B11<1))

OK

Note: this also assumes you will be entering time *within* a 24 hour period.
12:00 AM to 11:59 PM

--
Biff
Microsoft Excel MVP


"Barbara T" wrote in message
...
Hi!

I am trying to set up a spreadsheet where I use data validation to
restrict
certain cells to only allow times within a specified range (e.g., 7:00AM
to
6:00PM) but ONLY when another cell (A11) contains "DAY SHIFT". If that
other
cell (A11) does NOT contain "DAY SHIFT" then I want the validated cells to
still allow only times to be entered but to allow ANY time to be entered.

Is there a way to set this up? I can't see how to restrict when the data
validation occurs when the restrictions are based on TIME.

Thanks so much for any insight you can give!!

Barbara



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default How to use formula to decide when to apply TIME data validation

In D11 select Data validationCustom and copy paste the below formula

=AND(A11="Day shift",D11<"",MEDIAN("07:00 AM",D11,"06:00 PM")=D11)

If this post helps click Yes
---------------
Jacob Skaria


"Barbara T" wrote:

Hi!

I am trying to set up a spreadsheet where I use data validation to restrict
certain cells to only allow times within a specified range (e.g., 7:00AM to
6:00PM) but ONLY when another cell (A11) contains "DAY SHIFT". If that other
cell (A11) does NOT contain "DAY SHIFT" then I want the validated cells to
still allow only times to be entered but to allow ANY time to be entered.

Is there a way to set this up? I can't see how to restrict when the data
validation occurs when the restrictions are based on TIME.

Thanks so much for any insight you can give!!

Barbara

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default How to use formula to decide when to apply TIME data validation

=AND(A11="Day shift",D11<"",MEDIAN("07:00 AM",D11,"06:00 PM")=D11)

That doesn't allow for entry of *any time* when A11 < day shift.

If that other cell (A11) does NOT contain "DAY SHIFT"
then I want the validated cells to still allow only times to
be entered but to allow ANY time to be entered.



--
Biff
Microsoft Excel MVP


"Jacob Skaria" wrote in message
...
In D11 select Data validationCustom and copy paste the below formula

=AND(A11="Day shift",D11<"",MEDIAN("07:00 AM",D11,"06:00 PM")=D11)

If this post helps click Yes
---------------
Jacob Skaria


"Barbara T" wrote:

Hi!

I am trying to set up a spreadsheet where I use data validation to
restrict
certain cells to only allow times within a specified range (e.g., 7:00AM
to
6:00PM) but ONLY when another cell (A11) contains "DAY SHIFT". If that
other
cell (A11) does NOT contain "DAY SHIFT" then I want the validated cells
to
still allow only times to be entered but to allow ANY time to be entered.

Is there a way to set this up? I can't see how to restrict when the data
validation occurs when the restrictions are based on TIME.

Thanks so much for any insight you can give!!

Barbara



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
Apply Data Validation List only IF . . . KUMPFfrog Excel Worksheet Functions 2 April 2nd 08 09:41 PM
How do I apply a formula to multiple rows at the same time? ManhattanRebel Excel Worksheet Functions 1 November 22nd 07 03:28 PM
How do I apply the ROUNDUP formula to a range of calculated data IslandGreenHouse Excel Worksheet Functions 1 May 28th 05 10:12 PM
time formatting and time categorizing (vlookup or data validation) MarianneR Excel Worksheet Functions 4 November 18th 04 03:24 PM
time formatting and time categorizing (vlookup or data validation) MarianneR Excel Worksheet Functions 0 November 18th 04 03:13 PM


All times are GMT +1. The time now is 07:28 AM.

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"