ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF Function and a formula (https://www.excelbanter.com/excel-worksheet-functions/120155-if-function-formula.html)

Fred Atkinson

IF Function and a formula
 
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

Ron Coderre

IF Function and a formula
 
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


Teethless mama

IF Function and a formula
 
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


Fred Atkinson

IF Function and a formula
 
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


Fred Atkinson

IF Function and a formula
 
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


Fred Atkinson

IF Function and a formula
 
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


David Biddulph

IF Function and a formula
 
=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




Fred Atkinson

IF Function and a formula
 
Thanks,

That worked great.

Regards,



Fred

On Sat, 2 Dec 2006 18:01:58 -0000, "David Biddulph"
wrote:

=IF(Y<=0,"",100*(X/Y)



All times are GMT +1. The time now is 06:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com