#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default If statements

I am having a lot of trouble with an if, then statement. Here is what I have:

In the following cells I will have a number
Q9, R9, S9

In T9 I am wanting it to calculate the following:
If S9=0, then it should automatically equal 00.00%, otherwise
If R9=0, and Q90, thenit should equal (100%), if this statement is false,
then it should equal 100%, otherwise
If R<0, then S9/R9

This is the function I entered:
=IF($S9=0,"00.00%",if(and($r9=0,$q90),"(100%)","1 00%",if($r9<0,$S9/$R9)))

We are working on these very detailed reports and this is something our
supervisor asked us to work on. I'm not sure if this can even be done, but I
am stuck at this point.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default If statements

Hi,

If i've managed to follow you logic this may work. Format the cell as %.

=IF(S9=0,1,IF(AND(R9=0,Q90),1,IF(AND(R9<0,Q9<=0) ,1,IF(R9<0,S9/R9,""))))

If this is incorrect correct the table below and we can try again

condition output
s9=0 0%
and (r9=0 Q90) 100%
and (r9<0 q9<0) 100%
r9<0 s9/r9 as percentage


Mike

"pdgarza" wrote:

I am having a lot of trouble with an if, then statement. Here is what I have:

In the following cells I will have a number
Q9, R9, S9

In T9 I am wanting it to calculate the following:
If S9=0, then it should automatically equal 00.00%, otherwise
If R9=0, and Q90, thenit should equal (100%), if this statement is false,
then it should equal 100%, otherwise
If R<0, then S9/R9

This is the function I entered:
=IF($S9=0,"00.00%",if(and($r9=0,$q90),"(100%)","1 00%",if($r9<0,$S9/$R9)))

We are working on these very detailed reports and this is something our
supervisor asked us to work on. I'm not sure if this can even be done, but I
am stuck at this point.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default If statements

Thanks Mike! That worked perfectly!!

"Mike H" wrote:

Hi,

If i've managed to follow you logic this may work. Format the cell as %.

=IF(S9=0,1,IF(AND(R9=0,Q90),1,IF(AND(R9<0,Q9<=0) ,1,IF(R9<0,S9/R9,""))))

If this is incorrect correct the table below and we can try again

condition output
s9=0 0%
and (r9=0 Q90) 100%
and (r9<0 q9<0) 100%
r9<0 s9/r9 as percentage


Mike

"pdgarza" wrote:

I am having a lot of trouble with an if, then statement. Here is what I have:

In the following cells I will have a number
Q9, R9, S9

In T9 I am wanting it to calculate the following:
If S9=0, then it should automatically equal 00.00%, otherwise
If R9=0, and Q90, thenit should equal (100%), if this statement is false,
then it should equal 100%, otherwise
If R<0, then S9/R9

This is the function I entered:
=IF($S9=0,"00.00%",if(and($r9=0,$q90),"(100%)","1 00%",if($r9<0,$S9/$R9)))

We are working on these very detailed reports and this is something our
supervisor asked us to work on. I'm not sure if this can even be done, but I
am stuck at this point.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default If statements

well in equal measure I'm both glad I could help and amazed :)

"pdgarza" wrote:

Thanks Mike! That worked perfectly!!

"Mike H" wrote:

Hi,

If i've managed to follow you logic this may work. Format the cell as %.

=IF(S9=0,1,IF(AND(R9=0,Q90),1,IF(AND(R9<0,Q9<=0) ,1,IF(R9<0,S9/R9,""))))

If this is incorrect correct the table below and we can try again

condition output
s9=0 0%
and (r9=0 Q90) 100%
and (r9<0 q9<0) 100%
r9<0 s9/r9 as percentage


Mike

"pdgarza" wrote:

I am having a lot of trouble with an if, then statement. Here is what I have:

In the following cells I will have a number
Q9, R9, S9

In T9 I am wanting it to calculate the following:
If S9=0, then it should automatically equal 00.00%, otherwise
If R9=0, and Q90, thenit should equal (100%), if this statement is false,
then it should equal 100%, otherwise
If R<0, then S9/R9

This is the function I entered:
=IF($S9=0,"00.00%",if(and($r9=0,$q90),"(100%)","1 00%",if($r9<0,$S9/$R9)))

We are working on these very detailed reports and this is something our
supervisor asked us to work on. I'm not sure if this can even be done, but I
am stuck at this point.

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 statements Excel Function Application[_2_] New Users to Excel 9 June 30th 07 02:54 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
How can I add IF statements [email protected] Excel Worksheet Functions 3 June 23rd 06 01:20 PM
If Statements... Delaina Excel Discussion (Misc queries) 4 August 1st 05 10:29 PM
Add two IF statements together Dubbs Excel Worksheet Functions 2 June 15th 05 03:52 PM


All times are GMT +1. The time now is 08:27 AM.

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

About Us

"It's about Microsoft Excel"