Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Equation Efficiency?

In trying to create "validated" spreadsheets for my company that meet their
rigorous criteria I frequently run into the problem of wanting more than
seven IF statements in a single equation. Here's an example where I've
reached the seven statement limit but need one mo

=IF(AND(F31="N/A",F32="N/A"),"N/A",IF(AND(F31="ND",F32="ND"),"ND",IF(OR(F31="Te xt
Error",F32="Text Error"),"Text Error",IF(OR(F31="Numeric Error",F32="Numeric
Error"),"Numeric Error",IF(F31="ND", F32,
IF(AND(F310.1049,F32<=0.1049),F31,IF(AND(F320.10 49,F31<=0.1049),F32,AVERAGE(F31:F32))))))))

I'm sure there's a way to be more efficient with the given criteria but I'm
not fluent enough in excel equations to shorten it. Given enough time I have
shortened these in the past but it's not pretty. Are there any tips or
tricks that could help me be more efficient with my equations?

Criteria to meet for a simple AVERAGE calculation:
if both cells are "N/A" return "N/A"
if both cells are "ND" return "ND"
if a text value is entered other than "ND" return "Text Error"
if a negative value is entered return "Numerical Error"
if one cell is "ND" return the other (this usually takes two IF statements
for me)
if the calculated value from one cell is greater than the specified limit
and one is less, don't average and return the high value
if both cells are above the limit, average as normal
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 143
Default Equation Efficiency?

Two suggestions:

1. If upgrading to Excel 2007 is a possibility, go for it. It will allow
64 nested Ifs. That should accomodate the most prolific if'er.

2. In my pre-2007 days, I would evaluate criteria in seperate columns. If
the result was True, I would assign a value of 1. 0 if False. Then I would
use a final If to perform the final calculation based on the individual
columns. =IF(AND(AA1=0,AB1=1,AC1=1... etc.

Your formula looks to be fairly compact as it is. If your problem is an
'If' limitation, then there is not a great deal that I know of. Hopefully
someone else can provide a better answer.

Finally, you might want to look into VBA for your answer. You can do some
pretty wild stuff if you can learn it or hire someone already familiar.
--
Regards,

PJ
Please rate this post using the vote buttons if it was helpful.



"Ithaca" wrote:

In trying to create "validated" spreadsheets for my company that meet their
rigorous criteria I frequently run into the problem of wanting more than
seven IF statements in a single equation. Here's an example where I've
reached the seven statement limit but need one mo

=IF(AND(F31="N/A",F32="N/A"),"N/A",IF(AND(F31="ND",F32="ND"),"ND",IF(OR(F31="Te xt
Error",F32="Text Error"),"Text Error",IF(OR(F31="Numeric Error",F32="Numeric
Error"),"Numeric Error",IF(F31="ND", F32,
IF(AND(F310.1049,F32<=0.1049),F31,IF(AND(F320.10 49,F31<=0.1049),F32,AVERAGE(F31:F32))))))))

I'm sure there's a way to be more efficient with the given criteria but I'm
not fluent enough in excel equations to shorten it. Given enough time I have
shortened these in the past but it's not pretty. Are there any tips or
tricks that could help me be more efficient with my equations?

Criteria to meet for a simple AVERAGE calculation:
if both cells are "N/A" return "N/A"
if both cells are "ND" return "ND"
if a text value is entered other than "ND" return "Text Error"
if a negative value is entered return "Numerical Error"
if one cell is "ND" return the other (this usually takes two IF statements
for me)
if the calculated value from one cell is greater than the specified limit
and one is less, don't average and return the high value
if both cells are above the limit, average as normal

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
Trying to improve efficiency of array formula Anthony[_4_] Excel Worksheet Functions 8 November 25th 08 10:23 AM
How do I make a compressor map with efficiency islands? erfigge Charts and Charting in Excel 3 April 15th 08 05:33 PM
Calculation Efficiency (Speed)? Ken Excel Discussion (Misc queries) 2 October 29th 07 12:00 PM
Range efficiency Steven Excel Worksheet Functions 0 December 9th 05 02:15 PM
Question re efficiency in vlookup Mark Stephens Excel Worksheet Functions 1 August 2nd 05 07:31 AM


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