Prev: E2007 formulas display as formulas, not results
Next: Extracting data from multiple new workbooks via one master workboo
From: Mark on 14 Jan 2010 18:06 Can someone tell why this formula returns a negitive =IF((((F6-G6)+(I6-J6))*24)>8,8,((F6-G6)+(I6-J6))*24) The cells f6 g6 i6 j6 are formated for time calculations in a time sheet The time format is 01:00-24:00 hours It returns the correct total except for the fact that the total comes up negative. Thanks Mark
From: Joe User on 14 Jan 2010 19:19
"Mark" wrote: > Can someone tell why this formula returns a negitive > =IF((((F6-G6)+(I6-J6))*24)>8,8,((F6-G6)+(I6-J6))*24) It will return a negative value whenever F6-G6+I6-J6 < 0. Without your provided details about the contents of all of the cells, anything else I might say would be just speculation. Perhaps the times in G6 and/or J6 is greater than the times in F6 and/or I6, either because you are subtracting the wrong way (earlier minus later) or because the times cross midnight (two different days). In any case, you can simplify your formula above to: =MIN(8, (F6-G6+I6-J6)*24) ----- original message ---- "Mark" wrote: > Can someone tell why this formula returns a negitive > =IF((((F6-G6)+(I6-J6))*24)>8,8,((F6-G6)+(I6-J6))*24) > > The cells f6 g6 i6 j6 are formated for time calculations in a time sheet > The time format is 01:00-24:00 hours > > It returns the correct total except for the fact that the total comes up > negative. > > Thanks > Mark |