Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I limit formula results to positive only?
I am working a drivers logbook formula for 80 hours in 7 days with a reset to
zero when a driver has a day off. My problem is when the day off resets the hours to zero the next calculation is giving me a negative number of hours. I am using the formula =IF(F110,G10+F11-F4,0) where F11 is the current work day G10 is the previous total hours and F4 is the hours from 7 days prior. The problem is on day F12 if the hours worked are less than F5 the cell records a negative number and then uses it in the following calculations. I need to limit the time to positive only, how do I get the cell value to remain zero if the formula provides a negative result? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I limit formula results to positive only?
how about:
=IF(F110,MAX(0,G10+F11-F4),0) -- Best Regards, Luke M "mathjegna" wrote in message ... I am working a drivers logbook formula for 80 hours in 7 days with a reset to zero when a driver has a day off. My problem is when the day off resets the hours to zero the next calculation is giving me a negative number of hours. I am using the formula =IF(F110,G10+F11-F4,0) where F11 is the current work day G10 is the previous total hours and F4 is the hours from 7 days prior. The problem is on day F12 if the hours worked are less than F5 the cell records a negative number and then uses it in the following calculations. I need to limit the time to positive only, how do I get the cell value to remain zero if the formula provides a negative result? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I limit formula results to positive only?
The IF part is obsolete.
-- Regards, Peo Sjoblom "Luke M" wrote in message ... how about: =IF(F110,MAX(0,G10+F11-F4),0) -- Best Regards, Luke M "mathjegna" wrote in message ... I am working a drivers logbook formula for 80 hours in 7 days with a reset to zero when a driver has a day off. My problem is when the day off resets the hours to zero the next calculation is giving me a negative number of hours. I am using the formula =IF(F110,G10+F11-F4,0) where F11 is the current work day G10 is the previous total hours and F4 is the hours from 7 days prior. The problem is on day F12 if the hours worked are less than F5 the cell records a negative number and then uses it in the following calculations. I need to limit the time to positive only, how do I get the cell value to remain zero if the formula provides a negative result? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I limit formula results to positive only?
Use two conditions as follows:
=IF(AND(F110,G10+F11-F40),G10+F11-F4,0) -- If this helps, please remember to click yes. "mathjegna" wrote: I am working a drivers logbook formula for 80 hours in 7 days with a reset to zero when a driver has a day off. My problem is when the day off resets the hours to zero the next calculation is giving me a negative number of hours. I am using the formula =IF(F110,G10+F11-F4,0) where F11 is the current work day G10 is the previous total hours and F4 is the hours from 7 days prior. The problem is on day F12 if the hours worked are less than F5 the cell records a negative number and then uses it in the following calculations. I need to limit the time to positive only, how do I get the cell value to remain zero if the formula provides a negative result? |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
How do I limit formula results to positive only?
Another solution
=IF(F110,max(0,G10+F11-F4),0) Success - click yes... -- Wag more, bark less "mathjegna" wrote: I am working a drivers logbook formula for 80 hours in 7 days with a reset to zero when a driver has a day off. My problem is when the day off resets the hours to zero the next calculation is giving me a negative number of hours. I am using the formula =IF(F110,G10+F11-F4,0) where F11 is the current work day G10 is the previous total hours and F4 is the hours from 7 days prior. The problem is on day F12 if the hours worked are less than F5 the cell records a negative number and then uses it in the following calculations. I need to limit the time to positive only, how do I get the cell value to remain zero if the formula provides a negative result? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Subtracting positive amts from negative and positive from positive | Excel Worksheet Functions | |||
IF formula only showing positive results | Excel Discussion (Misc queries) | |||
Why Subtracting Two Negative Numbers Results in Positive Number | Excel Worksheet Functions | |||
keep the results as positive numbers | Excel Worksheet Functions | |||
Positive Results | Excel Worksheet Functions |