Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Prevent a Weekend date entry

I have a column used to insert dates for a certain activity. Is is possible
for me to restrict someone from entering a date that falls on a specific day
of the week?

Thanks in advance
Anurag
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Prevent a Weekend date entry

I have a column used to insert dates for a certain activity. Is is possible
for me to restrict someone from entering a date that falls on a specific
day
of the week?


If we are talking about a user typing in a date, you could use Excel's
Data/Validation menu item to do that. For example, to restrict the user from
entering a date that falls on a Wednesday, you could select the entire
column and then use this Custom Formula in the Data/Validation dialog box...

=WEEKDAY(A1)<4

where I have assumed the dates are in Column A.

Rick

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Prevent a Weekend date entry

That worked. I had tried using the same formula earlier without actually
selecting the entire column and that didnt work for me.

Since I wanted the weekend, I tied to use this formula:
=OR(WEEKDAY(D1)<1,WEEKDAY(D1)<7)

But with this, nothing is working!

"Rick Rothstein (MVP - VB)" wrote:

I have a column used to insert dates for a certain activity. Is is possible
for me to restrict someone from entering a date that falls on a specific
day
of the week?


If we are talking about a user typing in a date, you could use Excel's
Data/Validation menu item to do that. For example, to restrict the user from
entering a date that falls on a Wednesday, you could select the entire
column and then use this Custom Formula in the Data/Validation dialog box...

=WEEKDAY(A1)<4

where I have assumed the dates are in Column A.

Rick


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Prevent a Weekend date entry

You don't want OR for that combination... you want AND

=AND(WEEKDAY(D1)<1,WEEKDAY(D1)<7)

Both must be true for the date to be on Monday thru Friday; however, by
using the optional 2nd argument for the WEEKDAY function, you can use a
simple formula like the original one I posted. Try this custom validation
formula instead (note the 2 in the second argument of the WEEKDAY function
call)...

=WEEKDAY(D1,2)<6

Rick


"Anurag" wrote in message
...
That worked. I had tried using the same formula earlier without actually
selecting the entire column and that didnt work for me.

Since I wanted the weekend, I tied to use this formula:
=OR(WEEKDAY(D1)<1,WEEKDAY(D1)<7)

But with this, nothing is working!

"Rick Rothstein (MVP - VB)" wrote:

I have a column used to insert dates for a certain activity. Is is
possible
for me to restrict someone from entering a date that falls on a
specific
day
of the week?


If we are talking about a user typing in a date, you could use Excel's
Data/Validation menu item to do that. For example, to restrict the user
from
entering a date that falls on a Wednesday, you could select the entire
column and then use this Custom Formula in the Data/Validation dialog
box...

=WEEKDAY(A1)<4

where I have assumed the dates are in Column A.

Rick



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Prevent a Weekend date entry

Nevermind. I got it. Many thanks.

"Rick Rothstein (MVP - VB)" wrote:

I have a column used to insert dates for a certain activity. Is is possible
for me to restrict someone from entering a date that falls on a specific
day
of the week?


If we are talking about a user typing in a date, you could use Excel's
Data/Validation menu item to do that. For example, to restrict the user from
entering a date that falls on a Wednesday, you could select the entire
column and then use this Custom Formula in the Data/Validation dialog box...

=WEEKDAY(A1)<4

where I have assumed the dates are in Column A.

Rick


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
Prevent formula entry news.freedom2surf.net Excel Worksheet Functions 4 June 22nd 07 04:42 AM
Due date excluding weekend days Jfilbig Excel Worksheet Functions 5 February 5th 06 06:45 PM
Prevent entry in a column Nick S Excel Worksheet Functions 3 September 27th 05 10:02 AM
How to Find Weekend date Mike Metal Excel Worksheet Functions 3 May 5th 05 05:13 AM
How to prevent double entry in excel? George Teng Excel Discussion (Misc queries) 3 March 15th 05 08:01 AM


All times are GMT +1. The time now is 11:49 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"