Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I need to use the IF function to prevent a value from dropping
below zero. What I've tried with Excel doesn't seem to work for me. I'll represent the formula by <FORMULA. What I am trying to do is illustrated by: IF <FORMULA gt 0 then cell=<FORMULA IF <FORMULA eq 0 then cell=0 IF <FORMULA lt 0 then cell=0 All of this should take place within the same cell and yield a value. If this is done right, the value displayed in the cell should never be less than zero. Regards, Fred |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try something like this:
=MAX(your_formula,0) Does that help? *********** Regards, Ron XL2002, WinXP "Fred Atkinson" wrote: I need to use the IF function to prevent a value from dropping below zero. What I've tried with Excel doesn't seem to work for me. I'll represent the formula by <FORMULA. What I am trying to do is illustrated by: IF <FORMULA gt 0 then cell=<FORMULA IF <FORMULA eq 0 then cell=0 IF <FORMULA lt 0 then cell=0 All of this should take place within the same cell and yield a value. If this is done right, the value displayed in the cell should never be less than zero. Regards, Fred |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
=IF(A10,A1,0) "Fred Atkinson" wrote: I need to use the IF function to prevent a value from dropping below zero. What I've tried with Excel doesn't seem to work for me. I'll represent the formula by <FORMULA. What I am trying to do is illustrated by: IF <FORMULA gt 0 then cell=<FORMULA IF <FORMULA eq 0 then cell=0 IF <FORMULA lt 0 then cell=0 All of this should take place within the same cell and yield a value. If this is done right, the value displayed in the cell should never be less than zero. Regards, Fred |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks, Ron,
That worked fine. Regards, Fred On Sun, 26 Nov 2006 06:14:01 -0800, Ron Coderre wrote: Try something like this: =MAX(your_formula,0) Does that help? *********** Regards, Ron XL2002, WinXP "Fred Atkinson" wrote: I need to use the IF function to prevent a value from dropping below zero. What I've tried with Excel doesn't seem to work for me. I'll represent the formula by <FORMULA. What I am trying to do is illustrated by: IF <FORMULA gt 0 then cell=<FORMULA IF <FORMULA eq 0 then cell=0 IF <FORMULA lt 0 then cell=0 All of this should take place within the same cell and yield a value. If this is done right, the value displayed in the cell should never be less than zero. Regards, Fred |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I tried that. For some reason, it doesn't like the function I
am using. But the previous post worked. Thanks for your suggestion. Fred Atkinson On Sun, 26 Nov 2006 07:41:02 -0800, Teethless mama wrote: Try this: =IF(A10,A1,0) "Fred Atkinson" wrote: I need to use the IF function to prevent a value from dropping below zero. What I've tried with Excel doesn't seem to work for me. I'll represent the formula by <FORMULA. What I am trying to do is illustrated by: IF <FORMULA gt 0 then cell=<FORMULA IF <FORMULA eq 0 then cell=0 IF <FORMULA lt 0 then cell=0 All of this should take place within the same cell and yield a value. If this is done right, the value displayed in the cell should never be less than zero. Regards, Fred |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Ron,
What about if I have something like this?: IF (Y0) THEN =100*(X/Y) IF (Y=0) THEN <leave cell blank IF (Y<0) THEN <leave cell blank In other words, instead of displaying ERR because I'm dividing by zero, I just want to leave the cell blank. What would be the best way to do this? Fred On Sun, 26 Nov 2006 19:36:05 -0500, Fred Atkinson wrote: Thanks, Ron, That worked fine. Regards, Fred On Sun, 26 Nov 2006 06:14:01 -0800, Ron Coderre wrote: Try something like this: =MAX(your_formula,0) Does that help? *********** Regards, Ron XL2002, WinXP "Fred Atkinson" wrote: I need to use the IF function to prevent a value from dropping below zero. What I've tried with Excel doesn't seem to work for me. I'll represent the formula by <FORMULA. What I am trying to do is illustrated by: IF <FORMULA gt 0 then cell=<FORMULA IF <FORMULA eq 0 then cell=0 IF <FORMULA lt 0 then cell=0 All of this should take place within the same cell and yield a value. If this is done right, the value displayed in the cell should never be less than zero. Regards, Fred |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=IF(Y<=0,"",100*(X/Y))
-- David Biddulph "Fred Atkinson" wrote in message ... Ron, What about if I have something like this?: IF (Y0) THEN =100*(X/Y) IF (Y=0) THEN <leave cell blank IF (Y<0) THEN <leave cell blank In other words, instead of displaying ERR because I'm dividing by zero, I just want to leave the cell blank. What would be the best way to do this? Fred On Sun, 26 Nov 2006 19:36:05 -0500, Fred Atkinson wrote: Thanks, Ron, That worked fine. Regards, Fred On Sun, 26 Nov 2006 06:14:01 -0800, Ron Coderre wrote: Try something like this: =MAX(your_formula,0) Does that help? *********** Regards, Ron XL2002, WinXP "Fred Atkinson" wrote: I need to use the IF function to prevent a value from dropping below zero. What I've tried with Excel doesn't seem to work for me. I'll represent the formula by <FORMULA. What I am trying to do is illustrated by: IF <FORMULA gt 0 then cell=<FORMULA IF <FORMULA eq 0 then cell=0 IF <FORMULA lt 0 then cell=0 All of this should take place within the same cell and yield a value. If this is done right, the value displayed in the cell should never be less than zero. Regards, Fred |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks,
That worked great. Regards, Fred On Sat, 2 Dec 2006 18:01:58 -0000, "David Biddulph" wrote: =IF(Y<=0,"",100*(X/Y) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
?IF function for preventing a cell being filled by formula | Excel Worksheet Functions | |||
Last Saved Date Formula / Function | Excel Discussion (Misc queries) | |||
numerical integration | Excel Discussion (Misc queries) | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions |