if and formula

K

kevin carter

hi
i am trying to check if a time value is greater that 2am and smaller
than 2.30 am
if it is put 1:59:30 in the cell
if it the time value is smaller or bigger put cel value into cell

i am using the formula below

=IF(AND(C73>="02:00:00",C73<="02:30:00"),"01:59:30",C73)


i am checking the formula with 02:01:00 (should put 1:59:30 ) actuall
puts 02:01:00

i am checking the formula with 01:01:29(should put 01:01:29) actuall
puts 01:01:29



but i can't get it working correctly
any ideas

thanks

kevin
 
P

Pete_UK

By enclosing those times within quotes you are converting them to text
values. Try it like this:

=IF(AND(C73>=TIME(2,0,0),C73<=TIME(2,30,0)),TIME(1,59,30),C73)

Hope this helps.

Pete
 
K

kevin carter

By enclosing those times within quotes you are converting them to text
values. Try it like this:

=IF(AND(C73>=TIME(2,0,0),C73<=TIME(2,30,0)),TIME(1,59,30),C73)

Hope this helps.

Pete






- Show quoted text -

Thanks
Works a treat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top