Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
F6Hawk
 
Posts: n/a
Default Too many nested functions

I am trying to create a bowling scoring worksheet, and have got it worked out
great, except that I was using nested IFs to get the scores. It works great
up to the 7th one, but I need about 10 to get the job done, so am looking for
an alternative solution. My formula using IFs is:

=IF(AND(B4="X", E4="X", H4="X"), 30,
+IF(AND(B4="X", E4="X", H4="-"), 20,
+IF(AND(B4="X", E4="X", H4<""), 20+H4,
+IF(AND(B4="X", E4<"", F4="/"), 20,
+IF(AND(B4="X", E4="-", F4="-"), 10,
+IF(AND(B4="X", E4="-", F4<""), 10+F4,
+IF(AND(B4="X", E4<"", F4<""), 10+E4+F4, "")))))))

I need to continue to test B4 & C4 about 3 more times to get all the
possible entries; and until the bowling scoring parameters are met, I want a
blank in the cell.

What should I use instead? I have tried looking into a =INDEX(range,
MATCH(ball1), MATCH(ball2) and looking that up in a table, but am having
difficulties with situations such as no entry {""}, strike{X}, and spare{/}.

Thank you in advance for any assistance, and feel free to ask for any
clarification I may have overlooked.


  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

F6Hawk,

You could get rid of the nesting by using 0s as your returns for false
valus, something like:

=IF(AND(B4="X", E4="X", H4="X"), 30, 0) +
IF(AND(B4="X", E4="X", H4="-"), 20, 0) +
IF(AND(B4="X", E4="X", H4<""), 20+H4, 0) +
IF(AND(B4="X", E4<"", F4="/"), 20, 0) + .....

HTH,
Bernie
MS Excel MVP

"F6Hawk" wrote in message
...
I am trying to create a bowling scoring worksheet, and have got it worked

out
great, except that I was using nested IFs to get the scores. It works

great
up to the 7th one, but I need about 10 to get the job done, so am looking

for
an alternative solution. My formula using IFs is:

=IF(AND(B4="X", E4="X", H4="X"), 30,
+IF(AND(B4="X", E4="X", H4="-"), 20,
+IF(AND(B4="X", E4="X", H4<""), 20+H4,
+IF(AND(B4="X", E4<"", F4="/"), 20,
+IF(AND(B4="X", E4="-", F4="-"), 10,
+IF(AND(B4="X", E4="-", F4<""), 10+F4,
+IF(AND(B4="X", E4<"", F4<""), 10+E4+F4, "")))))))

I need to continue to test B4 & C4 about 3 more times to get all the
possible entries; and until the bowling scoring parameters are met, I want

a
blank in the cell.

What should I use instead? I have tried looking into a =INDEX(range,
MATCH(ball1), MATCH(ball2) and looking that up in a table, but am having
difficulties with situations such as no entry {""}, strike{X}, and

spare{/}.

Thank you in advance for any assistance, and feel free to ask for any
clarification I may have overlooked.




  #3   Report Post  
Bernard Liengme
 
Posts: n/a
Default

This, of course, implies that the tests are mutually exclusive. If B4="X" ,
E4="X" and H4="X" and F4="/" then the result would be 50. Would be fine it
the same three cells were being test in each section of the sum.

Bernard


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
F6Hawk,

You could get rid of the nesting by using 0s as your returns for false
valus, something like:

=IF(AND(B4="X", E4="X", H4="X"), 30, 0) +
IF(AND(B4="X", E4="X", H4="-"), 20, 0) +
IF(AND(B4="X", E4="X", H4<""), 20+H4, 0) +
IF(AND(B4="X", E4<"", F4="/"), 20, 0) + .....

HTH,
Bernie
MS Excel MVP

"F6Hawk" wrote in message
...
I am trying to create a bowling scoring worksheet, and have got it worked

out
great, except that I was using nested IFs to get the scores. It works

great
up to the 7th one, but I need about 10 to get the job done, so am looking

for
an alternative solution. My formula using IFs is:

=IF(AND(B4="X", E4="X", H4="X"), 30,
+IF(AND(B4="X", E4="X", H4="-"), 20,
+IF(AND(B4="X", E4="X", H4<""), 20+H4,
+IF(AND(B4="X", E4<"", F4="/"), 20,
+IF(AND(B4="X", E4="-", F4="-"), 10,
+IF(AND(B4="X", E4="-", F4<""), 10+F4,
+IF(AND(B4="X", E4<"", F4<""), 10+E4+F4, "")))))))

I need to continue to test B4 & C4 about 3 more times to get all the
possible entries; and until the bowling scoring parameters are met, I
want

a
blank in the cell.

What should I use instead? I have tried looking into a =INDEX(range,
MATCH(ball1), MATCH(ball2) and looking that up in a table, but am having
difficulties with situations such as no entry {""}, strike{X}, and

spare{/}.

Thank you in advance for any assistance, and feel free to ask for any
clarification I may have overlooked.






  #4   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Bernard,

Yes, they are mutually exclusive. That's the nature of bowling scoring: if
E4 is an "X", then F4 cannot be "/". I'm not sure of his column structure,
but it appears that B and C will be the first "frame", E and F the second
frame, H and I, etc... for emtry, then D, G, J... for calculations.

Bernie


"Bernard Liengme" wrote in message
...
This, of course, implies that the tests are mutually exclusive. If B4="X"
, E4="X" and H4="X" and F4="/" then the result would be 50. Would be fine
it the same three cells were being test in each section of the sum.

Bernard


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
F6Hawk,

You could get rid of the nesting by using 0s as your returns for false
valus, something like:

=IF(AND(B4="X", E4="X", H4="X"), 30, 0) +
IF(AND(B4="X", E4="X", H4="-"), 20, 0) +
IF(AND(B4="X", E4="X", H4<""), 20+H4, 0) +
IF(AND(B4="X", E4<"", F4="/"), 20, 0) + .....

HTH,
Bernie
MS Excel MVP

"F6Hawk" wrote in message
...
I am trying to create a bowling scoring worksheet, and have got it
worked

out
great, except that I was using nested IFs to get the scores. It works

great
up to the 7th one, but I need about 10 to get the job done, so am
looking

for
an alternative solution. My formula using IFs is:

=IF(AND(B4="X", E4="X", H4="X"), 30,
+IF(AND(B4="X", E4="X", H4="-"), 20,
+IF(AND(B4="X", E4="X", H4<""), 20+H4,
+IF(AND(B4="X", E4<"", F4="/"), 20,
+IF(AND(B4="X", E4="-", F4="-"), 10,
+IF(AND(B4="X", E4="-", F4<""), 10+F4,
+IF(AND(B4="X", E4<"", F4<""), 10+E4+F4, "")))))))

I need to continue to test B4 & C4 about 3 more times to get all the
possible entries; and until the bowling scoring parameters are met, I
want

a
blank in the cell.

What should I use instead? I have tried looking into a =INDEX(range,
MATCH(ball1), MATCH(ball2) and looking that up in a table, but am having
difficulties with situations such as no entry {""}, strike{X}, and

spare{/}.

Thank you in advance for any assistance, and feel free to ask for any
clarification I may have overlooked.








  #5   Report Post  
F6Hawk
 
Posts: n/a
Default

You are 100% correct, Bernie. Thanks for the tip, I didn't realize that your
method actually "broke" the nest on the IFs. That will probably do the trick!

Thanks fellas for the input!

Dave

"Bernie Deitrick" wrote:

Bernard,

Yes, they are mutually exclusive. That's the nature of bowling scoring: if
E4 is an "X", then F4 cannot be "/". I'm not sure of his column structure,
but it appears that B and C will be the first "frame", E and F the second
frame, H and I, etc... for emtry, then D, G, J... for calculations.

Bernie


"Bernard Liengme" wrote in message
...
This, of course, implies that the tests are mutually exclusive. If B4="X"
, E4="X" and H4="X" and F4="/" then the result would be 50. Would be fine
it the same three cells were being test in each section of the sum.

Bernard


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
PivotTable canned functions doco Excel Discussion (Misc queries) 0 January 14th 05 03:52 PM
Nested IF limit or Open parentheses limit Fred Excel Discussion (Misc queries) 5 December 23rd 04 03:34 PM
Changing the language of built-in functions? Gustaf Liljegren New Users to Excel 3 December 20th 04 08:31 PM
nested ifs sthompson Setting up and Configuration of Excel 1 December 15th 04 06:38 PM
Where can I see VBA code for financial functions? eios Excel Worksheet Functions 1 November 2nd 04 01:00 PM


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