Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Excel - Restrict Value to Current Date and Time (NOW)

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
Hi

I am trying to restrict the value of certain fields to the current date and time only

I have tried entering in the formula

=NOW() in data validation but it doesnt seem to work

ANyone else have any ideas

Thanks

Andrew
 
If there is only one allowable input then why mess about with inputting it, never mind validating it?

FWIW, Now() does work, but it is a standard time (measured, I believe, in units of 100 nanoseconds) and so, can differ between entering and validating.

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 


hi,
I have tried entering in the formula

=NOW() in data validation but it doesnt seem to work

Exactly HOW are you using this function?

BTW, NOW() returns standard a Date/Time value in uints of DAYS. TODAY() returns the integral (Date) part of NOW().

Why not just get the NOW() Date/Time rather than require an input, as Tony has suggested?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I have a function that returns the now date/time and makes it static. the field then gets locked so they can't edit the value.

However, the user can still input another date/time that is not the actual time they are updating the record.

So what I was trying to do was to ensure that the user can only put in the current date/time in that field and nothing else
 



If you have a function, then why does the user need to enter what the function can return? Seems counterproductive to me, or you're not explaining your problem very well.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Try this:
[tt]Allow: Time
Data: Greater than
Start Time: =TIME(HOUR(NOW()),MINUTE(NOW()),)[/tt]

A man has only two choices: He can be right or he can be happy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top