LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-01-2014, 09:40 AM   #1
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 10 (Buster) x64
Posts: 4,257

Rep: Reputation: 440Reputation: 440Reputation: 440Reputation: 440Reputation: 440
Question How to auto total separate entries in spreadsheet?


Hi.

In the attached spreadsheet example - How can I auto tally the full donations made to a particular charity? Getting the full total for all is easy but how can I tally for something that contains a certain term; e.g.'Cat Charity' etc?

What formula to use?

Thanks.
Attached Thumbnails
Click image for larger version

Name:	Donations.gif
Views:	15
Size:	31.3 KB
ID:	15132  
 
Old 04-01-2014, 09:43 AM   #2
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
The key is a formula using the if function
 
Old 04-02-2014, 04:32 AM   #3
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 10 (Buster) x64
Posts: 4,257

Original Poster
Rep: Reputation: 440Reputation: 440Reputation: 440Reputation: 440Reputation: 440
Quote:
Originally Posted by ericson007 View Post
The key is a formula using the if function
I was thinking that but don't know of the exact formula.
 
Old 04-02-2014, 04:48 AM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
You've got loads of room; no need to skimp. If you put each charity in a different column and not all piled together in one column, then the solution is obvious. Right?
jdk
 
Old 04-02-2014, 05:51 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,817

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Even better, use a separate tab/sheet for each Charity.
 
Old 04-02-2014, 06:12 AM   #6
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
You can also use pivot tables. That may be quickest, no need for formulas.
 
Old 04-02-2014, 08:47 AM   #7
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 10 (Buster) x64
Posts: 4,257

Original Poster
Rep: Reputation: 440Reputation: 440Reputation: 440Reputation: 440Reputation: 440
Quote:
Originally Posted by jdkaye View Post
You've got loads of room; no need to skimp. If you put each charity in a different column and not all piled together in one column, then the solution is obvious. Right?
jdk
But I'd like to have all donations ordered by date.
 
Old 04-02-2014, 11:05 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by LinusStallman View Post
But I'd like to have all donations ordered by date.
I'm not exactly what you mean. You can order them anyway you like. You can create a report and dictate exactly how you want the output ordered. That is independent of the way the cells are ordered. But I really don't understand what your problem is. Maybe you can give a bit more detail about what you're trying to do. I don't really think you have any problem doing it the way it was suggested.
jdk
 
Old 04-02-2014, 04:09 PM   #9
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 10 (Buster) x64
Posts: 4,257

Original Poster
Rep: Reputation: 440Reputation: 440Reputation: 440Reputation: 440Reputation: 440
Quote:
Originally Posted by jdkaye View Post
I'm not exactly what you mean. You can order them anyway you like. You can create a report and dictate exactly how you want the output ordered. That is independent of the way the cells are ordered. But I really don't understand what your problem is. Maybe you can give a bit more detail about what you're trying to do. I don't really think you have any problem doing it the way it was suggested.
jdk
Ok, for E2 Total the forumula is =SUM(C2:C10). For each of the others (Cat Charity, Dog Charity, etc.) I want something like (the following code is totally wrong but I'm trying to explain what I mean) if="Cat Charity" then add to SUM or something along those lines.

Last edited by linustalman; 04-02-2014 at 04:11 PM.
 
Old 04-02-2014, 04:24 PM   #10
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by chrism01 View Post
Even better, use a separate tab/sheet for each Charity.
That would be one successful way of doing it. If you don't do that, and those charity names are entered manually each time, the way that you are trying to do things won't be reliable. Someone will enter 'Donkey Charity' rather than 'Donkey Charity' (or even 'Donkey charity') and you have to either find a way of preventing that (possible, but possibly ugly), making it easier to detect, or of making the thing work in spite of that.

(maybe that would have been clearer with code tags - that sort of makes the point!)

Last edited by salasi; 04-02-2014 at 04:25 PM. Reason: explanation of 'bad formatting'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use XLSperl, xlsgrep.pl, perl-spreadsheet-read, someting else? Calc spreadsheet monsteriname Linux - Software 1 10-24-2012 07:32 AM
system froze when I clicked Save for Calc spreadsheet, now the spreadsheet is gone Stringdude Linux - Newbie 2 11-24-2010 02:05 AM
I got switched from a word process doc. into spreadsheet form. now ALL is spreadsheet 293 manzanita Linux - Newbie 1 08-04-2010 02:14 PM
OpenOffice Spreadsheet - Total All "Numerical" Values in a Column dudeman41465 Linux - Software 1 05-01-2009 10:21 AM
Looking for a tool to auto crop and separate images in to separate files.. mlsfit Linux - Software 2 08-06-2006 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration