ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Time check (https://www.excelbanter.com/excel-discussion-misc-queries/141406-time-check.html)

Finks

Time check
 
Is there a way to get Excel to check if the time entered in a cell (in the
format hh:mm) is less than the current time?
Cheers.

FSt1

Time check
 
hi,
something like this might work...
=IF(C1B1,"Less","greater")
where C1 and B1 are times and C1 is the current time
this will work too....
=IF(NOW()B1,"Less","greater")
B1 would be the time and NOW() would be the current time and eliminates the
need for cell C1.

regards
FSt1

"Finks" wrote:

Is there a way to get Excel to check if the time entered in a cell (in the
format hh:mm) is less than the current time?
Cheers.


Finks

Time check
 
Thanks for the quick response. I tried =IF(NOW()B1,"Less","greater") but
what ever time I type in B1 I get the response 'Less'.

"FSt1" wrote:

hi,
something like this might work...
=IF(C1B1,"Less","greater")
where C1 and B1 are times and C1 is the current time
this will work too....
=IF(NOW()B1,"Less","greater")
B1 would be the time and NOW() would be the current time and eliminates the
need for cell C1.

regards
FSt1

"Finks" wrote:

Is there a way to get Excel to check if the time entered in a cell (in the
format hh:mm) is less than the current time?
Cheers.


David Biddulph[_2_]

Time check
 
Don't forget that NOW() gives current time and today's date. If you are
merely typing in a time, it will be treated as being on Excel's first day
(00/01/1900), so of course it is less than NOW().

You might try replacing NOW() by MOD(NOW(),1), which will give current time
and ditch the number of days since the beginning of 1900.
--
David Biddulph

"Finks" wrote in message
...
Thanks for the quick response. I tried =IF(NOW()B1,"Less","greater") but
what ever time I type in B1 I get the response 'Less'.

"FSt1" wrote:

hi,
something like this might work...
=IF(C1B1,"Less","greater")
where C1 and B1 are times and C1 is the current time
this will work too....
=IF(NOW()B1,"Less","greater")
B1 would be the time and NOW() would be the current time and eliminates
the
need for cell C1.

regards
FSt1

"Finks" wrote:

Is there a way to get Excel to check if the time entered in a cell (in
the
format hh:mm) is less than the current time?
Cheers.




Finks

Time check
 
That works perfectly, thank you.

"David Biddulph" wrote:

Don't forget that NOW() gives current time and today's date. If you are
merely typing in a time, it will be treated as being on Excel's first day
(00/01/1900), so of course it is less than NOW().

You might try replacing NOW() by MOD(NOW(),1), which will give current time
and ditch the number of days since the beginning of 1900.
--
David Biddulph

"Finks" wrote in message
...
Thanks for the quick response. I tried =IF(NOW()B1,"Less","greater") but
what ever time I type in B1 I get the response 'Less'.

"FSt1" wrote:

hi,
something like this might work...
=IF(C1B1,"Less","greater")
where C1 and B1 are times and C1 is the current time
this will work too....
=IF(NOW()B1,"Less","greater")
B1 would be the time and NOW() would be the current time and eliminates
the
need for cell C1.

regards
FSt1

"Finks" wrote:

Is there a way to get Excel to check if the time entered in a cell (in
the
format hh:mm) is less than the current time?
Cheers.






All times are GMT +1. The time now is 09:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com