[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

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.
jrkrideau
Super User

Joined: 08 Aug 2005
Posts: 6733

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
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2
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)
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)
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.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum