;1617376']"slipper said:
The line of code you posted
=NOW() + TIME(0,RANDBETWEEN(0,15),0)
would that work in conditional formatting as a new rule?-
NOW()+TIME(...) simply computes a number, a future date&time. It doe
not
cause an event to take place at the future time.
You might calculate the future date&time in some cell (X1). (How to d
that
is another matter.) Then for the cell with the hidden message, yo
might
have the conditional formats:
=NOW()>=X1
and
=NOW()<X1
each specifying an appropriate cell font and/or fill color.
However, NOW() is not recalculated automagically. Excel does not
re-evaluate NOW() every second, for example. So unless there is a
recalculation at the date&time in X1, the cell format will not chang
then.
Moreover, there is the matter of how the future date&time is entere
into
X1. You cannot simply use NOW()+TIME(...) because NOW() changes
dynamically. It is the current time, after all. Also, RANDBETWEEN()
changes dynamically, as well. It is recalculated every time there is
recalculation cycle; for example, every time any cell in any workshee
in
the workbook is edited.
So you would have to use VBA code either to effectively compute
NOW()+TIME(...) or to enable the recalculation of X1, if X1 is on a
worksheet for which calculation is normally disabled.
And since VBA is needed anyway, I would forego any attempt to make
conditional formatting work for this purpose. Instead, I would use VB
to
implement all of the needed functionality: perhaps an event procedur
and
one or two procedures that are executed using Application.OnTime.
slipper said:
for several of the messages i want them hidden from the user
for a random time (0-15 minutes).
I can hide the message from the user by originally filling the
cell black which effectivley hides the message, the problem is
how to clear this formatting after the random time has elapsed.-
This is very complicated and difficult to do correctly. It is difficul
to
cover and handle all contingencies.
In addition to the problem of revealing the hidden, there is th
question
of: once revealed, must the cell fill format be restored to blac
(hidden)
again? If so, what triggers that?
There is no single "right answer". You're the inventor: you need to
specify the process and the actions precisely enough to implement.
And BTW, I do not believe setting a black background color truly hide
the
message (when the foreground color is black). It is still visible i
the
Formula Bar, next to "fx" under the Tool Bar, for example. Unless yo
have
removed the Formula Bar, and you have taken steps to prevent the use
from
reinstating it.
So, I think we need to hear a lot more details about your current or
intended design before we start providing solutions.
And it might help if you provided an example Excel file tha
demonstrates
the intended design, as well as you can do, of course.
I think excelbanter.com provides a method for attaching files. But mor
generally, upload the example Excel file to a file-sharing website, an
post
the "shared" URL in a response here. The following is a list of som
free
file-sharing websites; or use one of your own choice.
Box.Net:
http://www.box.net/files
Dropbox:
http://dropbox.com
MediaFi
http://www.mediafire.com
FileFactory:
http://www.filefactory.com
FileSavr:
http://www.filesavr.com
RapidSha
http://www.rapidshare.com
Windows Live Skydrive:
http://skydrive.live.com
Unfortunately, I will not be able to help you further. This will take
lot
of work, and I do not have that kind of time.
But hopefully, my comments above are helpful by putting you on the righ
path. And perhaps someone else will jump in to step you through the
implementation, once you provide all of the design details.
Good luck!