| View previous topic :: View next topic |
| Author |
Message |
srfurby Newbie

Joined: 01 Nov 2005 Posts: 4
|
Posted: Thu Aug 09, 2007 11:55 am Post subject: Expense Sheet error code |
|
|
I am trying to set up an expense sheet that totals numbers in one column that match criteria from another column to a specific cell. The formula I used is as follows;
=DSUM(G6:G22;B6:B22;=5040). I get the error code 510. Any help out there?
Tks, Steve. |
|
| Back to top |
|
 |
jrkrideau Super User

Joined: 08 Aug 2005 Posts: 6733 Location: Kingston ON Canada
|
Posted: Fri Aug 10, 2007 4:05 am Post subject: Re: Expense Sheet error code |
|
|
| srfurby wrote: | I am trying to set up an expense sheet that totals numbers in one column that match criteria from another column to a specific cell. The formula I used is as follows;
=DSUM(G6:G22;B6:B22;=5040). I get the error code 510. Any help out there?
Tks, Steve. |
I don't think ;= is a valid expression.
Error codes list available at : http://documentation.openoffice.org/manuals/oooauthors2/0315CG-CalcErrorCodes.pdf _________________ jrkrideau
Kingston ON Canada
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2 |
|
| Back to top |
|
 |
RickRandom Super User

Joined: 27 Jan 2006 Posts: 1082 Location: UK
|
Posted: Fri Aug 10, 2007 6:30 am Post subject: Re: Expense Sheet error code |
|
|
| srfurby wrote: | The formula I used is as follows;
=DSUM(G6:G22;B6:B22;=5040). I get the error code 510. |
I think the database needs appropriate headings, etc, but I don't know.
Try
=SUMIF(G6:G22;5040;B6:B22)
or
=SUMIF(B6:B22;5040;G6:G22) |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Fri Aug 10, 2007 6:44 am Post subject: |
|
|
SUMIF, as suggested by Rick, should do the job.
Advanced filters and D-functions work with criteria ranges.
If your list has one header "Amount", this is the criteria range:
Amount
5040
and the formula looks like this:
=DSUM(G6:G22;B6:B22;$AA$1:$AA$2)
or with a range name:
=DSUM(G6:G22;B6:B22;criteria) |
|
| Back to top |
|
 |
srfurby Newbie

Joined: 01 Nov 2005 Posts: 4
|
Posted: Thu Aug 16, 2007 7:42 am Post subject: expense report formula |
|
|
| Sorry it took so long to get back to this question. The seconund sumif formula worked. Thanks for your help. |
|
| Back to top |
|
 |
|