Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
KidMW14
 
Posts: n/a
Default Conditional Functions

I have data in 2 columns that I want to work with. In one column (O) is a
percentage that sometimes equals 0. In the other (P) is a percentage that
never equals 0. Now in the third column (Q), I have the function =(P2-O2)/O2,
but sometimes, when O=0%, the function doesn't work. So I changed it to say
=IF((O2=0%),200%,(P2-O2)/O2). I never want the Q column to be more than 200%.
It works for numbers that quotient to more than 200%, but for functions where
O=0%, it says #DIV/0!, where it should just say 200%, as I've instructed it.
What should I do?
  #2   Report Post  
KidMW14
 
Posts: n/a
Default Conditional Functions

Sorry, I meant that the equation I made was
=IF(OR(O2=0%,(P2-O2)/O2200%),200%,(P2-O2)/O2)

"KidMW14" wrote:

I have data in 2 columns that I want to work with. In one column (O) is a
percentage that sometimes equals 0. In the other (P) is a percentage that
never equals 0. Now in the third column (Q), I have the function =(P2-O2)/O2,
but sometimes, when O=0%, the function doesn't work. So I changed it to say
=IF((O2=0%),200%,(P2-O2)/O2). I never want the Q column to be more than 200%.
It works for numbers that quotient to more than 200%, but for functions where
O=0%, it says #DIV/0!, where it should just say 200%, as I've instructed it.
What should I do?

  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default Conditional Functions

On Sat, 12 Nov 2005 20:06:02 -0800, "KidMW14"
wrote:

Sorry, I meant that the equation I made was
=IF(OR(O2=0%,(P2-O2)/O2200%),200%,(P2-O2)/O2)

"KidMW14" wrote:

I have data in 2 columns that I want to work with. In one column (O) is a
percentage that sometimes equals 0. In the other (P) is a percentage that
never equals 0. Now in the third column (Q), I have the function =(P2-O2)/O2,
but sometimes, when O=0%, the function doesn't work. So I changed it to say
=IF((O2=0%),200%,(P2-O2)/O2). I never want the Q column to be more than 200%.
It works for numbers that quotient to more than 200%, but for functions where
O=0%, it says #DIV/0!, where it should just say 200%, as I've instructed it.
What should I do?



The problem is that within your initial OR function, which gets executed every
time, you are dividing by 0, hence the error.

Try something like:

=if(o2=0,200%,min(200%,(p2-o2)/o2))


--ron
  #4   Report Post  
Biff
 
Posts: n/a
Default Conditional Functions

Hi!

Try this:

=IF(ISERROR((P2-O2)/O2),200%,IF((P2-O2)/O2200%,200%,(P2-O2)/O2))

Biff

"KidMW14" wrote in message
...
I have data in 2 columns that I want to work with. In one column (O) is a
percentage that sometimes equals 0. In the other (P) is a percentage that
never equals 0. Now in the third column (Q), I have the function
=(P2-O2)/O2,
but sometimes, when O=0%, the function doesn't work. So I changed it to
say
=IF((O2=0%),200%,(P2-O2)/O2). I never want the Q column to be more than
200%.
It works for numbers that quotient to more than 200%, but for functions
where
O=0%, it says #DIV/0!, where it should just say 200%, as I've instructed
it.
What should I do?



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
Conditional format combined with functions DAJ Excel Worksheet Functions 1 November 3rd 05 01:01 AM
Conditional Lookup Functions Rlmccants Excel Worksheet Functions 4 August 11th 05 10:14 PM
Multiple FIND functions in Conditional Formatting RocketFuMaster Excel Worksheet Functions 2 March 2nd 05 06:09 PM
conditional functions j Excel Worksheet Functions 2 December 10th 04 02:55 PM
conditional functions juliafw Excel Worksheet Functions 1 December 9th 04 05:19 PM


All times are GMT +1. The time now is 04:30 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"