Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 269
Default 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?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 846
Default 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?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 136
Default 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?





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtracting positive amts from negative and positive from positive bwbmom Excel Worksheet Functions 3 February 12th 10 03:15 PM
IF formula only showing positive results Davidm Excel Discussion (Misc queries) 2 August 19th 08 05:17 AM
Why Subtracting Two Negative Numbers Results in Positive Number Les[_3_] Excel Worksheet Functions 7 October 26th 07 10:46 PM
keep the results as positive numbers Raza Excel Worksheet Functions 6 January 31st 07 12:23 PM
Positive Results lmthomas Excel Worksheet Functions 3 August 20th 05 02:45 PM


All times are GMT +1. The time now is 04:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"