if and formula

  • Thread starter Thread starter kevin carter
  • Start date Start date
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
 
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
 
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
 
Back
Top