WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Validate cell for date, as well as day of the week

 
   Home -> Office -> General Discussions RSS
Next:  counta problem  
Author Message
David Langschied

External


Since: Sep 03, 2007
Posts: 3



(Msg. 1) Posted: Tue Nov 18, 2008 11:09 am
Post subject: Validate cell for date, as well as day of the week
Archived from groups: microsoft>public>excel (more info?)

I have looked through what is out there and I am not hopeful that this can be
done, but here goes...

I have a cell that will be populated with a date. I need to make sure that
the date does not fall on a Saturday or a Sunday and that the date is not
older than 2 days. I was hoping to be able to do both of these in a single
validation, but I have a snag. The weekday function requires a cell, but I
am validating on the current cell and, even though I do know what it is, i
want to allow that that may change. How can I accomplish this?
Back to top
Login to vote
Billy Liddel

External


Since: Nov 22, 2006
Posts: 251



(Msg. 2) Posted: Tue Nov 18, 2008 6:45 pm
Post subject: RE: Validate cell for date, as well as day of the week [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

David

I could not get data validation to work. But until someone answers your
query perhaps you can use conditional formatting.

Set the cell condition to; Formula Is and paste the formula

=OR(B1<TODAY()-2,WEEKDAY(B1)=1,WEEKDAY(B1)=7,B1>TODAY())

and set the colour to say to red.

You can set this over a range - just type the reference to the first cell in
the range. The conditional formatting can be copied anywhere using the Paste
Format icon.

Peter Atherton

"David Langschied" wrote:

> I have looked through what is out there and I am not hopeful that this can be
> done, but here goes...
>
> I have a cell that will be populated with a date. I need to make sure that
> the date does not fall on a Saturday or a Sunday and that the date is not
> older than 2 days. I was hoping to be able to do both of these in a single
> validation, but I have a snag. The weekday function requires a cell, but I
> am validating on the current cell and, even though I do know what it is, i
> want to allow that that may change. How can I accomplish this?
>
>
>
Back to top
Login to vote
OssieMac

External


Since: Jan 25, 2007
Posts: 460



(Msg. 3) Posted: Tue Nov 18, 2008 7:02 pm
Post subject: RE: Validate cell for date, as well as day of the week [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Use a formula (custom) in data validation and insert the following formula:

Replace A1 with the first cell in the selected cells to apply the validation
to.

=AND(A1>=TODAY()-2,TEXT(A1,"ddd")<>"Sat",TEXT(A1,"ddd")<>"Sun")

or you could weekday function in lieu of text function but I like the above
because it is self documenting as to which days to exclude.


--
Regards,

OssieMac


"David Langschied" wrote:

> I have looked through what is out there and I am not hopeful that this can be
> done, but here goes...
>
> I have a cell that will be populated with a date. I need to make sure that
> the date does not fall on a Saturday or a Sunday and that the date is not
> older than 2 days. I was hoping to be able to do both of these in a single
> validation, but I have a snag. The weekday function requires a cell, but I
> am validating on the current cell and, even though I do know what it is, i
> want to allow that that may change. How can I accomplish this?
>
>
>
Back to top
Login to vote
Shane Devenshire

External


Since: Nov 11, 2008
Posts: 927



(Msg. 4) Posted: Tue Nov 18, 2008 11:33 pm
Post subject: RE: Validate cell for date, as well as day of the week [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

In the data validation Custom area enter the formula

=AND(MOD(A1,7)>1,(TODAY()-A1)<2)

Note you specified a date not more than two days old, but you did not
indicate if that date could be in the future.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"David Langschied" wrote:

> I have looked through what is out there and I am not hopeful that this can be
> done, but here goes...
>
> I have a cell that will be populated with a date. I need to make sure that
> the date does not fall on a Saturday or a Sunday and that the date is not
> older than 2 days. I was hoping to be able to do both of these in a single
> validation, but I have a snag. The weekday function requires a cell, but I
> am validating on the current cell and, even though I do know what it is, i
> want to allow that that may change. How can I accomplish this?
>
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET