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 Can u put an "IF" inside of another "IF"??

Or how else could you do something like that? I need a excel program to do
something similar to this:

=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),(IF(P58=P59,AV ERAGE(P58:P59),P60),0

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,117
Default Can u put an "IF" inside of another "IF"??

yes, you can do that, almost exactly. you just need some more
paretheses, i think............

=ROUND(IF(O60=TRUE,(AVERAGE(P42:Q43)),(IF(P58=P59,
(AVERAGE(P58:P59)),P60))))

i don't have it quite right, yet, it says there's an error. i'm
horrible with nesting formulas & having the correct number of
parentheses & arguments! a tip, tho - when you're constructing the
formula up in the formula bar as you move the cursor from parenthesis
to parenthesis, they are different colors and light up so you can make
sure you've got an opening one & a closing one.
hope it got you started, at least!
:)
susan


On Jan 9, 3:58*pm, NotExcelingNow
wrote:
Or how else could you do something like that? *I need a excel program to do
something similar to this:

=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),(IF(P58=P59,AV ERAGE(P58:P59),P60),0


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Can u put an "IF" inside of another "IF"??

I think you were just missing a close parentheses after that P60. Try this:
=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),(IF(P58=P59,AV ERAGE(P58:P59),P60))),2)

It rounds to two decimal places; change the 2 right at the end to get more
or less precision.

Regards,
Ryan--

--
RyGuy


"NotExcelingNow" wrote:

Or how else could you do something like that? I need a excel program to do
something similar to this:

=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),(IF(P58=P59,AV ERAGE(P58:P59),P60),0

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Can u put an "IF" inside of another "IF"??

Sometimes, too many ()'s make formulas easier to read--sometimes, they hurt.

=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),IF(P58=P59,AVE RAGE(P58:P59),P60)),0)
or just
=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),IF(P58=P59,P58 ,P60)),0)

if p58=p59, then average(p58:p59) will be the same as either number:

average(3,3) = 3
average(3134,3134)=3134



NotExcelingNow wrote:

Or how else could you do something like that? I need a excel program to do
something similar to this:

=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),(IF(P58=P59,AV ERAGE(P58:P59),P60),0


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Can u put an "IF" inside of another "IF"??

THANK YOU!!!!

Just wanted to post the final formula.

=ROUND(IF(O63=TRUE,AVERAGE(P45:Q46),IF(D61=TRUE,AV ERAGE(P44:Q46),IF(E61=TRUE,AVERAGE(P43:Q46),IF(F61 =TRUE,AVERAGE(P42:Q46),IF(G61=TRUE,AVERAGE(P41:Q46 ),IF(H61=TRUE,AVERAGE(P40:Q46),P46)))))),0)

=AND(M63=TRUE,H46=H45,H45=H44,H44=H43,H43=H42,H41= H42,H41=H40)

=IF(O63=TRUE,"The average ",IF(D61=TRUE,"The average ",IF(E61=TRUE,"The
average ",IF(F61=TRUE,"The average ",IF(G61=TRUE,"The average
",IF(H61=TRUE,"The average ","The "))))))

I got everything running just like I wanted, thank you sooo much!


"Dave Peterson" wrote:

Sometimes, too many ()'s make formulas easier to read--sometimes, they hurt.

=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),IF(P58=P59,AVE RAGE(P58:P59),P60)),0)
or just
=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),IF(P58=P59,P58 ,P60)),0)

if p58=p59, then average(p58:p59) will be the same as either number:

average(3,3) = 3
average(3134,3134)=3134



NotExcelingNow wrote:

Or how else could you do something like that? I need a excel program to do
something similar to this:

=ROUND(IF(O60=TRUE,AVERAGE(P42:Q43),(IF(P58=P59,AV ERAGE(P58:P59),P60),0


--

Dave Peterson

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
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


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