[Solved] IF DSUM SUMIF?

Discuss the spreadsheet application

[Solved] IF DSUM SUMIF?

Postby Leighrawlins » Fri Mar 20, 2020 2:59 am

I'm still very green when it comes to spreadsheets. :crazy:

I have a spreadsheet where want to add the totals from column C only if you put in an X in columns D-G. I have tried searching, googling and experimentation to no avail. I have tried IF DSUM and SUMIF but I am missing something.

Any help is appreciated. :)
Last edited by MrProgrammer on Tue Mar 24, 2020 7:41 pm, edited 2 times in total.
Reason: Moved from Beginners forum to Calc; Tagged ✓ [Solved]
OpenOffice 4.1.1 with MacOS X
Leighrawlins
 
Posts: 1
Joined: Fri Mar 20, 2020 2:46 am

Re: IF DSUM SUMIF?

Postby RusselB » Fri Mar 20, 2020 3:52 am

Welcome to the Forums.
From your brief description, it sounds like you would be best using the SUMPRODUCT function, rather than SUMIF, since you have your controls over several columns.
The formula would look like
Code: Select all   Expand viewCollapse view
=sumproduct(C2:C500;D2:G500="X")

If that doesn't work (modify it for your actual working range), then please attach a copy of your spreadsheet.
See How to attach a document for information about attaching and anonymizing your spreadsheet.
OpenOffice 4.1.7 and LibreOffice 6.3.3.2 on Windows 7 Pro & Ultimate
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
RusselB
Moderator
 
Posts: 6062
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: IF DSUM SUMIF?

Postby MrProgrammer » Fri Mar 20, 2020 4:33 am

Hi, and welcome to the forum.

Leighrawlins wrote:I'm still very green when it comes to spreadsheets.
[Tutorial] Ten concepts that every Calc user should know

Leighrawlins wrote:I have a spreadsheet where want to add the totals from column C only if you put in an X in columns D-G.
All of D-G? Any of D-G? Either SUMPRODUCT or DSUM will handle both cases.
202003192151.ods
(18.52 KiB) Downloaded 10 times
[Tutorial] The SUMPRODUCT function

RusselB wrote:=SUMPRODUCT(C2:C500;D2:G500="X")
#VALUE! error because the dimension of C2:C500 (499x1) does not match D2:G500 (499x4).

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800 on MacOS 10.14.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Moderator
 
Posts: 3981
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA


Return to Calc

Who is online

Users browsing this forum: No registered users and 10 guests