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 conditional formating using dates

I have data that is entered from a report that is done periodically and dont
want users to use the spreadsheet after a specific date (this date is entered
into a header). So I want to be able to look at the current date and compare
it to the header date and if the current date exceeds the header date then
the spreadsheet becomes unusable.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default conditional formating using dates

"jorgie" wrote:
I have data that is entered from a report that is done periodically and dont
want users to use the spreadsheet after a specific date (this date is entered
into a header). So I want to be able to look at the current date and compare
it to the header date and if the current date exceeds the header date then
the spreadsheet becomes unusable.


No answer, just some thoughts. Don't think CF* can render this:
the spreadsheet becomes unusable

*going by your subject line <g

Hang around for better insights ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 100
Default conditional formating using dates

Try this in VBA (Tools-Macro-Visual Basic Editor then select required sheet)

Assuming your date for validation is in A1.

Copy the following code.

=========================================
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1") = Date Then
With Cells.Validation
.Delete
.Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _
Operator:=xlEqual, Formula1:="0"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Sheet Expired"
.InputMessage = ""
.ErrorMessage = "Sheet Expired"
.ShowInput = True
.ShowError = True
End With
End If
End Sub
=========================================


Please rate me.

"jorgie" wrote:

I have data that is entered from a report that is done periodically and dont
want users to use the spreadsheet after a specific date (this date is entered
into a header). So I want to be able to look at the current date and compare
it to the header date and if the current date exceeds the header date then
the spreadsheet becomes unusable.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default conditional formating using dates

If you delete the date in cell A1 the code still "locks" the sheet. Also,
how does the owner of the file "unlock" it?

Biff

"Naveen" wrote in message
...
Try this in VBA (Tools-Macro-Visual Basic Editor then select required
sheet)

Assuming your date for validation is in A1.

Copy the following code.

=========================================
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1") = Date Then
With Cells.Validation
.Delete
.Add Type:=xlValidateTextLength, AlertStyle:=xlValidAlertStop, _
Operator:=xlEqual, Formula1:="0"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Sheet Expired"
.InputMessage = ""
.ErrorMessage = "Sheet Expired"
.ShowInput = True
.ShowError = True
End With
End If
End Sub
=========================================


Please rate me.

"jorgie" wrote:

I have data that is entered from a report that is done periodically and
don't
want users to use the spreadsheet after a specific date (this date is
entered
into a header). So I want to be able to look at the current date and
compare
it to the header date and if the current date exceeds the header date
then
the spreadsheet becomes unusable.



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
Dates in Conditional Formatting help!!! Corey Excel Worksheet Functions 1 July 27th 06 10:08 AM
can i freeze conditional formating to copy to another worksheet Chris Lane Excel Discussion (Misc queries) 1 October 12th 05 06:53 PM
IF Command conditional formating IDCrewDawg Excel Worksheet Functions 7 September 8th 05 04:19 PM
Conditional Formating & Rand() function BaldySlaphead Excel Discussion (Misc queries) 10 July 20th 05 03:43 PM
conditional formating using cells containg dates Roy Excel Discussion (Misc queries) 2 May 24th 05 09:52 PM


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