[Solved] What Function do I need and how to implement it.

Discuss the spreadsheet application
Post Reply
Banazauk
Posts: 2
Joined: Thu May 30, 2019 4:33 pm

[Solved] What Function do I need and how to implement it.

Post by Banazauk »

Hi everyone

I need some help with what function I need to use and how to implement it. I don't really use so I'm not sure how they work. I've tried searching, but as I don't know what I'm looking for, it has been fruitless.

I'm working on a sheet that shows how many miles a wagon has ran for the week. I want a function that will work add together the total miles that it ran when it was carrying goods and a total mileage for when it was travelling empty, e.g. going from the last drop to collect the next load. I have linked to an image of the sheet that I need help with below.

When there is an E in the column to the right of the miles, I want it so it only totals the cells to the left of the E, and vice versa for loaded miles which will be left blank in the same column.

Image

Thanks in advance.

Martyn
Last edited by Banazauk on Thu May 30, 2019 5:29 pm, edited 1 time in total.
OpenOffice 4.1.1
Windows 7 Ultimate
FJCC
Moderator
Posts: 9280
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: What Function do I need and how to implement it.

Post by FJCC »

The attached file shows two way to use formulas for this, once with SUMPRODUCT() and once with SUMIF(). SUMPRODUCT() is the more flexible method.
Attachments
ConditionalSum.ods
(10.21 KiB) Downloaded 93 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.
Banazauk
Posts: 2
Joined: Thu May 30, 2019 4:33 pm

Re: What Function do I need and how to implement it.

Post by Banazauk »

Thanks. I'll have a look and see if I can understand it.
OpenOffice 4.1.1
Windows 7 Ultimate
Post Reply