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

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

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

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



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

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



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

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
?IF function for preventing a cell being filled by formula confused teacher Excel Worksheet Functions 3 July 6th 06 06:01 AM
Last Saved Date Formula / Function [email protected] Excel Discussion (Misc queries) 3 June 7th 06 04:52 PM
numerical integration integreat Excel Discussion (Misc queries) 4 May 12th 06 02:40 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM


All times are GMT +1. The time now is 08:56 PM.

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"