Search code examples
excelif-statementmathtimecell

If statement using time format in Excel


I'm trying to set up something in excel where in cell F4 is a calculated time, in the format of something like this: 9:30:00. (Hours:Minutes:Seconds) Cell e8 is a static number that never changes, unless you manually change the cell lets say it's set as 10.

I am trying to set up a cell that looks at call f4, checks if its under 9:00:00 and if it is then times cell e8 by cell f4, if it's over 9 simply times cell e8 by a static number of 8.

my current code is t working,

=IF(f4>9:00, e8*9, e8*f4)


Solution

  • Is there any meaning when you multiply time value?

    Regardless, assuming that your F4 contains time data, like 8:00 or 9:25, use this:

    =IF(F4>TIME(9,0,0),E8*9,E8*F4)