Re: how to compute totals grouped by field?

Adam Dingle wrote:
In Gnumeric, suppose that I have a series of rows representing
payments to vendors.  Each row contains a date, a vendor name and a

4/3   XyzCo   4.15
4/4   AbcCo   8.20
4/5   XyzCo   2.25

I'd like to construct a table showing each vendor and the total of all
payments ever made to that vendor:

XyzCo  6.40
AbcCo  8.20

Is this possible in Gnumeric?  
Yes, there are a couple of ways to do this.
One way is to enter an array function to conditionally sum.
if XyzCo is in cell A7, and other companies below then this formula:

which you enter using ctrl+shift+enter so it will then appears like this:

will do the job. This also works in competing spreadsheet packages so is
quite portable.
Or must I export to an SQL database and execute a query such as
'select sum(payment) GROUP BY vendor', which would have a similar effect?


gnumeric-list mailing list
gnumeric-list gnome org

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