Hi
I'd like to know if it's possible to sum a number (cost) if the adjacent cell contains a specific word.
Example:
On one tab I'd like to make a list of costs, like this:
Cost Item Category
10 Banana Fruit
23 Carrot Vegetable
5 Apple Fruit
One the next tab, I'd like to automatically search the list and sum the costs, in order to see how much I've currently spent on fruit, for example. So that I end up with a new list:
Category Total spent
Fruit 15
Vegetable 23
How do I do it?
Thanks
[Solved] Sum if adjacent contains...
[Solved] Sum if adjacent contains...
Last edited by illern on Tue Feb 19, 2019 5:49 pm, edited 1 time in total.
Open Office 4 running on Mac OS Sierra 10
Re: Sum if adjacent contains...
SUMIF() will do the job with a formula like
Please see the attached document. To formula is on Sheet2.
Code: Select all
=SUMIF(Sheet1.C2:C4;A2;Sheet1.A2:A4)
- Attachments
-
- SummingFood.ods
- (9.35 KiB) Downloaded 113 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Sum if adjacent contains...
I love this forum!
Tremendous. Thank you!
Tremendous. Thank you!
Open Office 4 running on Mac OS Sierra 10
Re: [Solved] Sum if adjacent contains...
Another approach would be a Pivot Table formerly known as Data Pilot.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers