*From*: Stephen R Laniel <steve laniels org>*To*: Oliver Burnett-Hall <olly burnett-hall co uk>*Cc*: gnumeric-list gnome org*Subject*: Re: Array formulas, piecewise functions*Date*: Thu, 15 Sep 2005 11:03:23 -0400

On Wed, Sep 14, 2005 at 06:43:59PM +0100, Oliver Burnett-Hall wrote:

=SUM(($G$2:$G$30000>=H2)*($G$2:$G$30000<H3)) This works in Excel too.

I completely forgot about that approach, but it works great. Thanks so much for reminding me of it. Why doesn't =sum(if(and($g$2:$g$30000>=h2,$g$2:$g$30000<h3),1,0)) work? It should, right?

This looks okay. If you're getting TRUE or FALSE then I guess you're missing some arguments to one of the IF functions - double-check them to make sure all of them have three arguments (test, if-true, if-false).

Ah. I had just failed to include a default case when none of the IFs were true. When I added that in, all was fixed. Thanks very much for your help. If I may toss in one unrelated question here: I can't figure out how to add x-axis data to a chart. I thought that selecting both the x-axis column and the y-axis one would do the job, but Gnumeric treats both columns as data series, and numbers the x-axis with the number of data points. What am I missing? Thanks very much, Steve -- Stephen R. Laniel steve laniels org +(617) 308-5571 http://laniels.org/ PGP key: http://laniels.org/slaniel.key

**Attachment:
signature.asc**

**Follow-Ups**:**Re: Array formulas, piecewise functions***From:*Andreas J. Guelzow

**Re: Array formulas, piecewise functions***From:*Oliver Burnett-Hall

**References**:**Array formulas, piecewise functions***From:*Stephen R Laniel

**Re: Array formulas, piecewise functions***From:*Oliver Burnett-Hall

[Date Prev][Date Next] [Thread Prev][Thread Next] [Thread Index] [Date Index] [Author Index]