I'm getting a google sheets error "wrong number of arguments to SUMIF. Expected between 2 and 3 arguments, but got seven - google-sheets

=SUMIF(B41:B101,E41:E141,E36,F41:F141,F38,G41:G141,G38)
Tring to sum the values in B with a criteria for the ranges in E, F, and G. I'm a project manager, not a developer and I want this to be pretty so I don't want to use a pivot table. Can you help me get my statement right?
I want it to display the total of values that meet all three criteria instead of giving me an error message

You need SUMIFS(). Try-
=SUMIFS(B41:B101,E41:E141,E36,F41:F141,F38,G41:G141,G38)

Related

Query importrange HUGE multiple sheets and turns out error

so I have 5 separate google sheets, each one with the same title and format enter image description here.
There are 8000-10000 rows each so far, as it's a daily sales updating data, yearly may finish with 20000-40000 rows each.
So what I want to do is to merge all of them into another single sheet, and I've tried the following formulas:
enter image description here
Formula A
={IMPORTRANGE(B2,C2);IMPORTRANGE(B3,C3);IMPORTRANGE(B4,C4);IMPORTRANGE(B5,C5);IMPORTRANGE(B6,C6)}
Results:
#VALUE!
"In ARRAY_LITERAL, an Array Literal was missing values for one or more rows."
Formula B (reduced the data to only one month)
=QUERY({IMPORTRANGE(B2,C2);IMPORTRANGE(B3,C3);IMPORTRANGE(B4,C4);IMPORTRANGE(B5,C5);IMPORTRANGE(B6,C6)},"SELECT * Where Col2 > DATE'2022-5-1' AND Col2 <= DATE'2022-5-31' ",0)
Result:
#VALUE!
"In ARRAY_LITERAL, an Array Literal was missing values for one or more rows."
Formula C (check if is the problem of the code)
={IMPORTRANGE(B2,C2);IMPORTRANGE(B3,C3)}
Results:
It works.
So my question is that, there is anyway via google sheet let me merge all the 5 sheets in one (5sheets*40000rows into one sheet) , or it's not the place to manage that volumn of data?
every importrange needs to be run separately before you use it in your joint formula. the array error you are getting is a result of some importranges importing those 7 columns and those importranges that are not connected output one single cell. make sure you allow access to all your importranges.

Condition join in Google Sheets

(1) I am trying to TEXTJOIN email addresses in column F, if column B = a specific value. However, it is giving me all email addresses, regardless of column B value.
=TEXTJOIN(",",TRUE,IF(B$4:B$57="owner",F$4:F$57,""))
Sample table:
The result I am looking for is:
email1#testemail.com,email2#testemail.com
The result I am getting is:
email1#testemail.com,email2#testemail.com,email3#testemail.com
(2) If the formula is on a different sheet, I get an #VALUE! error.
=TEXTJOIN(",",TRUE,IF(sheet1!B4:B57="owner",sheet1!F4:F57,""))
(3) I am trying to have the results be de-duped or unique. Is it best just to add &UNIQUE=[range] within the array?
I'm sure I'm just missing some detail, but cannot figure it out. Any help appreciated!
You need an arrayformula() wrapper:
=arrayformula(TEXTJOIN(",",TRUE,IF(Sheet1!B4:B57="owner",Sheet1!F4:F57,"")))
In Excel 365 your formula works perfectly the way you wrote it .

How to seach column for all text matches in column A and sum all of the corrosponding values in column B Excel

I'm sure this is possible, but I've been trying various ways for the past 2 hours and can't find the solution.
I need to find all the instances of a text name in column A, lookup all the numerical results in column B and sum them together.
I thought =ArrayFormula(sum(lookup(F2,$A$2:$B$1000))) would do the trick, but it's only picking up the last value on the last mention and not all the values of all the mentions.
I've attached a spreadsheet to show the data I'm looking at.
Thanks to the reference from BigBen to check out Sumifs. Using this command, the following works a treat:
=SUMIFS(B2:B3115,A2:A3115,F2)
try:
=QUERY(A2:B; "select A,sum(B) where A is not null group by A label sum(B)''")

COUNTIFS throws parsing error: "#ERROR! Formula parse error."

=Countifs(Answers!C:C; = "foo";Answers!D:D;<D4;Answers!J:J;>D4)
I conducted a survey, in which people told me the clock-times they typically
enter (Sheet 'Answers', Column D) a specific facility named 'foo' (Sheet 'Answers', Column C) and when they typically leave it (Sheet 'Answers', Column J).
I want to get the number of people in 'foo' at a specific point in time ('D4'), so my approach is to count everyone who answered 'foo' and whose entry time was before the time in question and whose leaving time was after the time in question.
When I use the formula I get "#ERROR. Error while parsing formula."(roughly translated).
Am I using the formula incorrectly or is there a syntax error in there?
Try the following formula:
=countifs(Answers!C:C;"foo";Answers!D:D;"<"&D4;Answers!J:J;">"&D4)
Or (depending on your locale):
=countifs(Answers!C:C,"foo",Answers!D:D,"<"&D4,Answers!J:J,">"&D4)

Google query function

I am trying to return multiple records from a logbook into a final monthly statement... I'm using the query function but I do not get multiple records, it only displays the first match.
My sheets are from 1-31 for days of the month, then the last sheet labeled 717 is for Unit #717's monthly statement.
On Sheet 717, I would like to display information from sheets 1 through 31. Where column A=717, display values from columns B,C,D. Currently, it will only show me the first match. The amount column should show the corresponding rate for that row.
I hope my explanation is not confusing, any help is much appreciated. Thanks.
Here is a link to sample spreadsheet.
As you are concatenating the output of QUERY functions, you are actually performing an "array calculation", and you'll need use an "array calculation enabler", otherwise you will indeed only get the first applicable result.
=ArrayFormula(QUERY('1'!A3:G60;"select B where A=717")&QUERY('1'!A3:G60;"select C where A=717")&QUERY('1'!A3:G60;"select D where A=717"))

Resources