Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Can multiple criteria be used for IF formulas?

I am using the below formula to calculate percent of change from one year to
another year.

=IF(F3=0,1,U3/F3-1)

F3 being the amount spent in previous year
U3 being amount spent in current year

The question I want my formula to answer is: If F3 and U3 have a quotient
greater than zero, then calculate. However, I also want it to yield a 100
answer if the F3 is zero AND I also want it to yield 0 if both F3 and U3 are
zero.
--
Thanks, Christine
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default Can multiple criteria be used for IF formulas?

"CHaney" wrote:
=IF(F3=0,1,U3/F3-1)

[....]
I also want it to yield a 100 answer if the F3
is zero AND I also want it to yield 0 if both F3
and U3 are zero.


Your current formula seems to do just that. Did you try it?

When F3 and U3 are zero, it will return 1 (100% if formatted as Percentage)
because F3 is zero. There is no need to make a special case.

How is your formula behaving differently than you expect?

If the issue is it returns 1 instead of 100 [sic], either change 1 to 100 in
the formula (ill-advised) or be sure that the cell is formatted as Percentage.

If you do change 1 to 100 (ill-advised), you will need to change the last
argument to 100*(U3-F3)/F3 in order to be copacetic. In that case, be sure
that the cell is __not__ formatted as Percentage.


----- original message -----

"CHaney" wrote:
I am using the below formula to calculate percent of change from one year to
another year.

=IF(F3=0,1,U3/F3-1)

F3 being the amount spent in previous year
U3 being amount spent in current year

The question I want my formula to answer is: If F3 and U3 have a quotient
greater than zero, then calculate. However, I also want it to yield a 100
answer if the F3 is zero AND I also want it to yield 0 if both F3 and U3 are
zero.
--
Thanks, Christine

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Can multiple criteria be used for IF formulas?

Oh, sorry I should have entered that. I get the following results with my
formula.

If F3 and U3 are 0 it calculates
If F3 is 0, I get 100% --exactly as you said because it's formatted for
percentage

However, when both F3 and U3 are 0, I also get 100% when I want it to yield
0 as the percent of change. So, I wanted to know if I can ask it to yield the
one if only F3 is 0, and zero if U3 is zero, and zero if F3 and U3 are both 0.

--
Thanks, Christine


"Joe User" wrote:

"CHaney" wrote:
=IF(F3=0,1,U3/F3-1)

[....]
I also want it to yield a 100 answer if the F3
is zero AND I also want it to yield 0 if both F3
and U3 are zero.


Your current formula seems to do just that. Did you try it?

When F3 and U3 are zero, it will return 1 (100% if formatted as Percentage)
because F3 is zero. There is no need to make a special case.

How is your formula behaving differently than you expect?

If the issue is it returns 1 instead of 100 [sic], either change 1 to 100 in
the formula (ill-advised) or be sure that the cell is formatted as Percentage.

If you do change 1 to 100 (ill-advised), you will need to change the last
argument to 100*(U3-F3)/F3 in order to be copacetic. In that case, be sure
that the cell is __not__ formatted as Percentage.


----- original message -----

"CHaney" wrote:
I am using the below formula to calculate percent of change from one year to
another year.

=IF(F3=0,1,U3/F3-1)

F3 being the amount spent in previous year
U3 being amount spent in current year

The question I want my formula to answer is: If F3 and U3 have a quotient
greater than zero, then calculate. However, I also want it to yield a 100
answer if the F3 is zero AND I also want it to yield 0 if both F3 and U3 are
zero.
--
Thanks, Christine

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Can multiple criteria be used for IF formulas?

=U3/F3-1*(IF(F3=0,1)*(IF(F3+U3=0,0)))

I have also tried this formula. But the yield is #DIV/0!
--
Thanks, Christine


"CHaney" wrote:

Oh, sorry I should have entered that. I get the following results with my
formula.

If F3 and U3 are 0 it calculates
If F3 is 0, I get 100% --exactly as you said because it's formatted for
percentage

However, when both F3 and U3 are 0, I also get 100% when I want it to yield
0 as the percent of change. So, I wanted to know if I can ask it to yield the
one if only F3 is 0, and zero if U3 is zero, and zero if F3 and U3 are both 0.

--
Thanks, Christine


"Joe User" wrote:

"CHaney" wrote:
=IF(F3=0,1,U3/F3-1)

[....]
I also want it to yield a 100 answer if the F3
is zero AND I also want it to yield 0 if both F3
and U3 are zero.


Your current formula seems to do just that. Did you try it?

When F3 and U3 are zero, it will return 1 (100% if formatted as Percentage)
because F3 is zero. There is no need to make a special case.

How is your formula behaving differently than you expect?

If the issue is it returns 1 instead of 100 [sic], either change 1 to 100 in
the formula (ill-advised) or be sure that the cell is formatted as Percentage.

If you do change 1 to 100 (ill-advised), you will need to change the last
argument to 100*(U3-F3)/F3 in order to be copacetic. In that case, be sure
that the cell is __not__ formatted as Percentage.


----- original message -----

"CHaney" wrote:
I am using the below formula to calculate percent of change from one year to
another year.

=IF(F3=0,1,U3/F3-1)

F3 being the amount spent in previous year
U3 being amount spent in current year

The question I want my formula to answer is: If F3 and U3 have a quotient
greater than zero, then calculate. However, I also want it to yield a 100
answer if the F3 is zero AND I also want it to yield 0 if both F3 and U3 are
zero.
--
Thanks, Christine

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Can multiple criteria be used for IF formulas?

Thanks Joe for the help, I figured it out.

Used the following formula within the cell: =IF(F3=0,1,U3/F3-1)
Then used this formula in the Conditional Format to blank out the cell when
both cells were 0: =F3+U3=0

--
Thanks, Christine


"CHaney" wrote:

Oh, sorry I should have entered that. I get the following results with my
formula.

If F3 and U3 are 0 it calculates
If F3 is 0, I get 100% --exactly as you said because it's formatted for
percentage

However, when both F3 and U3 are 0, I also get 100% when I want it to yield
0 as the percent of change. So, I wanted to know if I can ask it to yield the
one if only F3 is 0, and zero if U3 is zero, and zero if F3 and U3 are both 0.

--
Thanks, Christine


"Joe User" wrote:

"CHaney" wrote:
=IF(F3=0,1,U3/F3-1)

[....]
I also want it to yield a 100 answer if the F3
is zero AND I also want it to yield 0 if both F3
and U3 are zero.


Your current formula seems to do just that. Did you try it?

When F3 and U3 are zero, it will return 1 (100% if formatted as Percentage)
because F3 is zero. There is no need to make a special case.

How is your formula behaving differently than you expect?

If the issue is it returns 1 instead of 100 [sic], either change 1 to 100 in
the formula (ill-advised) or be sure that the cell is formatted as Percentage.

If you do change 1 to 100 (ill-advised), you will need to change the last
argument to 100*(U3-F3)/F3 in order to be copacetic. In that case, be sure
that the cell is __not__ formatted as Percentage.


----- original message -----

"CHaney" wrote:
I am using the below formula to calculate percent of change from one year to
another year.

=IF(F3=0,1,U3/F3-1)

F3 being the amount spent in previous year
U3 being amount spent in current year

The question I want my formula to answer is: If F3 and U3 have a quotient
greater than zero, then calculate. However, I also want it to yield a 100
answer if the F3 is zero AND I also want it to yield 0 if both F3 and U3 are
zero.
--
Thanks, Christine

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
Can multiple criteria be used for IF formulas? CHaney Excel Worksheet Functions 1 February 25th 10 03:43 PM
Need Help w/ formulas for multiple criteria Jack.Matos[_2_] Excel Worksheet Functions 4 December 22nd 08 07:12 PM
How do I put multiple criteria in LOOKUP formulas Jai A Excel Worksheet Functions 4 March 13th 08 12:38 AM
Array Formulas with multiple criteria in the same row? Dan the Man[_2_] Excel Worksheet Functions 6 July 1st 07 05:25 PM
multiple criteria for formulas Jodi Excel Discussion (Misc queries) 4 May 11th 06 10:43 PM


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