From koffice Wed Sep 01 10:23:24 2004 From: Marc Heyvaert Date: Wed, 01 Sep 2004 10:23:24 +0000 To: koffice Subject: Re: Kspread question/help Message-Id: <20040901102324.80870.qmail () web41506 ! mail ! yahoo ! com> X-MARC-Message: https://marc.info/?l=koffice&m=109403424006458 Hello, --- Nicolas Goutte wrote: > The easiest would be with SUMIF but it has been > introdiced only very recently: > http://bugs.kde.org/show_bug.cgi?id=81026 > > As for a workaround, I do not know. > I think the following procedure is a possible workaround, but I can not test right now as I don't have KDE/KOffice on this machine: Create a column to hold either 0 if the value is to be ommited from sum and 1 or whatever number if it is to be included. With the "search" function you can search for a 'string' within another. Supposing that you can enter cell references for these strings (seems logical but as I said I can't test right now) and that when the string is not found this function returns zero as the offset (again I can't test and the documentation is not clear about this), you could use this function to fill the extra column. The next step is to use another column for an IF...THEN...ELSE construction. So in your this case something like : IF (the value in the 'test' column == 0) THEN (put zero in this cell) ELSE (put the number from column X) Copy this formula down and you can sum that straight away for your first subresult. If you need several subtotals depending on several strings, you have to introduce 2 columns like this for every 'type' of figure that you want to sum. If there are a lot of different 'types' a better workaround is to sort the lot and to add a 'sum' function for each category by hand, as you scroll down and scan the document. Marc > > On Tuesday 31 August 2004 21:50, Danny Angelo > Carminati Grein wrote: > > possible to do something like find rows that have > text "text" in X col > > cells? > > > > Like this: > > > > A B > > 1 10 text > > 2 -5 other > > 3 -6 text > > 4 1 text > > 5 18 other > > > > What I want is to locate all rows that have > "text" in column B .. then > > i will calculate the sum of these row but from > column A .. in this case, I > > need get this result: > > > > ... C D > > 10 text other > > 11 15 13 > > > > where 15 == sum of all cells relative to text > "text" and 13 == sum of all > > cells relative to text "other" ... > > > > This is because I need do a sheet that will > separate types of expenses and > > do especial calcs with these... > > _______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush ____________________________________ koffice mailing list koffice@mail.kde.org To unsubscribe please visit: https://mail.kde.org/mailman/listinfo/koffice