On 11/5/2010 6:11 PM, Dan Covill wrote:
> I'm not an Exceller, but I agree the syntax looks wrong.
> 1) The syntax for combining logical values is the AND(<l1>,<l2>).
> 2) I think the '*' has been working only because the logical result is
> internally a 1 or a 0.  It's not proper syntax - it's an accident of
> implementation.
> 3) I'd recommend you rewrite it to use AND(), and do it all inside an IF().
> 4) If you're going to work on this a long time, I'd seriously consider
> making it a macro and calling it.
>
> This is the structure, broken down:
>      if Bcol = 'H' and Ccol<  9  sum Fcol
>      if Bcol = 'H' and Ccol = '8a' sum Fcol
>      Add the two sums together (!)
> Note they're testing Bcol for 'H' twice each time, and always adding two
> sums together, whether or not either one was ever calculated.
> Logic should be:
>      if Bcol = 'H' and (Ccol<  9 or Ccol = '8a) sum Fcol
>      else return 0

I believe there are other values in Bcol besides 'H' so hence the need 
to specify it.

Thanks for the ideas.  I'll try them!

-- 
Mike Babcock, MCP
MB Software Solutions, LLC
President, Chief Software Architect
http://mbsoftwaresolutions.com
http://fabmate.com
http://twitter.com/mbabcock16

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to