Article View: comp.apps.spreadsheets
Article #51Re: @DSUM, other database functions don't work in 123 2.2 - why?
From: Sparky
Date: Wed, 05 Aug 1992 14:27
Date: Wed, 05 Aug 1992 14:27
56 lines
2525 bytes
2525 bytes
In article <1992Aug5.001115.21168@midway.uchicago.edu> ab2r@quads.uchicago.edu (Marshall Abrams) writes: >I'm using Lotus 123 v. 2.2, and it would be really handy to use >the @DSUM function. (This is one of the "database" functions. You >set up a "database" by entering data in a particular configuration, >and then refer to with a range that includes the labels above >the columns, etc. @DSUM(input_range,field_number,criteria_range) is >supposed to return the sum of ever cell in field field_number in >input_range that meets the criteria in criteria_range.) But it >doesn't work right. (Or else I'm not using it right.) > >I've tried all of the database functions except @DSTD and @DVAR, and >only @DCOUNT seems to work. (This counts the cells in the input_range >that meet the criteria in criteria_range.) @DCOUNT works fine, but >the other functions, including @DSUM, always return 0. > >For example (actual contents of each cell are listed--not what's >displayed in the cell): > > A B C D >1 'SALARY 'SALARY >2 90000 +A2>=83000 >3 56000 >4 25000 >5 35500 @DCOUNT(A1..A19,0,C1..C2) <---- returns 3 >6 22000 @DSUM(A1..A19,0,C1..C2) <---- returns 0 !?! >7 48000 >8 23000 >9 32500 >10 85000 >11 55000 >12 83000 >13 21000 >14 42500 >15 64500 >16 65000 >17 82500 >18 56000 >19 26800 > [STUFF DELETED] The problem also occurs in Excel 3.0. Try changing your criterion to exclude the cell reference. (As shown below). It should then work. SALARY >=83000 My guess why: Your criteria as entered is a formula which evaluates to true or false. (Cell A2>=83000 is either a true statement or a false one. TRUE in this case.) Lotus/Excel then uses TRUE as a criterion and sums the values in column A that contain the value TRUE. None do, so zero is the sum. I have no idea why DCOUNT works. (it doesn't work in Excel with the example you've given.) -- Sparky
Technical Details
Message-ID:
<1992Aug5.142714.26403@nrtpa038.bnr.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!convex!news.utdallas.edu!corpgate!brtph560!nrtpa038!cadnewsReferences:
<1992Aug5.001115.21168@midway.uchicago.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!convex!news.utdallas.edu!corpgate!brtph560!nrtpa038!cadnews From: Sparky Newsgroups: comp.apps.spreadsheets Subject: Re: @DSUM, other database functions don't work in 123 2.2 - why? Summary: RE: @DSUM Message-ID: <1992Aug5.142714.26403@nrtpa038.bnr.ca> Date: 5 Aug 92 14:27:14 GMT References: <1992Aug5.001115.21168@midway.uchicago.edu> Sender: cadnews@nrtpa038.bnr.ca (netnews posting host) Organization: None Worth Mentioning Lines: 56