Formula parse error with AVERAGEIFS in Google Sheets - google-sheets

I want to calculate averages in a column but only on selected rows, depending on specific values in another column. I see that I should probably use AVERAGEIF or AVERAGEIFS, but somehow it does not work, not even if I copy and paste the example from Google's help. I did experience the same in multiple browsers and with both versions of the function. What can be the problem?

Do you need to adjust the formula for your locale?
=AVERAGEIFS(A1:A10;B1:B10;">20")

Related

Edit data after FILTER in Google Docs

I have FILTER some range like "=FILTER(E1:M11;E1:M1=B1)" but I use FILTER for simple access to the cell-data, that must be edit, trying to wright something in to FILTER celLs given an a formula FILTER error...
google sheets does not support editing cells where the output of the formulas rolls out. this is a feature by design, not a bug. if you wish to re-write a print from a formula that formula needs to be inserted with a script, not as an in-cell function

how can I write a formula that uses a cell's contents when building a range reference to the name of another sheet?

I have a large Google Sheets spreadsheet that has individual sheets for financial statements of activity for multiple years. I want to reference particular columns of those in other sheets, and I've successfully figured out how to do that with an HLOOKUP function. However, because I want to do this for multiple years, I'd like that HLOOKUP function to pick up the name of the sheet to reference from its column header. Right now, I'm hard-coding it like this—you can see the HLOOKUP range refers to cells in the "2021 Overall" sheet. The hard-coded approach works but makes adding a new year tedious. Ideally, the HLOOKUP formula would read the contents of its column header cell to determine which year it is.
As best I can tell, the solution is to use INDIRECT, but I can't figure out any way to build the formulate with INDIRECT and not get an error. For instance, this seemed like it should work. As you can see, I have 2021 in cell D4, and my INDIRECT statement is referencing that and building the rest of the range.
I've also tried using INDIRECT with an explicit CONCATENATE, with no more success.
Any ideas for how to look up that D4 cell and slide it into the HLOOKUP range?
Thank you!
Try to remove the "'"& before D4 and the ' after the Overall.
Your formula should look like this:
=IFERROR(HLOOKUP($A$2,INDIRECT(F4 &" Overall!$A$5:$X$150", Utility!$A10, FALSE)))
With Nikko's nudges in the right direction, I eventually figured out the right format. This allows the formula to work in multiple sheets and to be filled right (for more years) and down (for more classes).
=IFERROR(HLOOKUP($A$2,INDIRECT("'"D$4&" Overall'!$A$5:$X$150"), Utility!$A3, FALSE))
Note that if you try to replicate this, you may need to type the formula out from scratch—I had a problem where pasting it in didn't work. Once I'd retyped it and Google Sheets acknowledged it, it worked from then on in the spreadsheet, even when pasted from sheet to sheet.

How can I apply conditional formatting to a list of values returned by IMPORTRANGE() function based on if the value occurs in another column

I am using Google Sheets and have been able to import a range of values from another sheet into my desired sheet that I am working from. I want to highlight the values in the imported range based on whether they occur in a column of values present within my sheet. I've looked up multiple resources online, but have yet to find a solution. Any advice is greatly appreciated.
For anyone that runs into a similar issue, I found a solution. I applied a custom formula as a conditional formatting rule. Here is the formula I used. =NOT(ISNA(VLOOKUP(A1,$I:$I,1,FALSE))). For an in-depth explanation, consider this link: https://www.automateexcel.com/formulas/if-isna-vlookup-2/

Sum of referenced ranges in google spreadsheets

In Google spreadsheets, how do I find the sum of two ranges referenced from different spreadsheets
I want to use something like
=(IMPORTRANGE("keyofsheet1","A1:A100")+ IMPORTRANGE("keyofsheet2","A1:A100"))
and get the sum
Apparently, the above doesn't work. Any help would be appreciated :).
I have found an answer:
Arrayformula is what I was looking for. It basically applies the formula treating the range as a range, instead of as a single element. I still donot totally understand why this works. would be really happy if someone could explain this
I just used
ARRAYFORMULA((IMPORTRANGE("keyofsheet1","A1:A100")+IMPORTRANGE("keyofsheet2","A1:A100")))
and suddenly everything works as it should.
Shouldn't the + operator be conscious of the input type it is getting and automatically respond by returning the appropriate type? why do I need to explicitly specify that this is an array formula
I ran into a similar issue yesterday. Solution was:
=SUM(IMPORTRANGE("keyofsheet1","SheetName!A1:A100")) + SUM(IMPORTRANGE("keyofsheet2","SheetName!A1:A100"))
No need to use ARRAYFORMULA()
2 important notes.
You will probably see a #REF! error in your cell with a red color in the corner. You'll need to hover over it and allow access to the spreadsheets that you're referencing.
If any of the original data in the spreadsheet ranges you're referencing in A1:A100 contain errors such as
#NULL!
#DIV/0!
#VALUE!
#REF!
#NAME?
#NUM!
#N/A
then your formula must be modified to include SUMIF() as follows
=SUMIF(IMPORTRANGE("keyofsheet1","SheetName!A1:A100"), ">0") + SUMIF(IMPORTRANGE("keyofsheet2","SheetName!A1:A100"), ">0")
This ensures that it's only adding anumbers and not error codes.

Google Spreadsheet range names

In Google Docs Spreadsheets, one can use Range Names to put labels on ranges of cells to make formulas more legible. In most formulas, one can use the range C:C to denote the entire C column, and C2:C to denote the entire C column after and including C2.
Is there a way to create range names of the same nature? When I try C:C or C2:C or Sheet!C:C or 'Sheet'!C:C I always get the error "The range you specified is not in a valid range format." I would like the range name to expand as my form adds rows to my spreadsheet. Thanks.
I just discovered the if you use the '-' operator, it starts from the bottom row. So,
=INDIRECT("-D:D12")
starts from the last row and works it's way up to D12!
I had a similar problem. Although I do not know how to do exactly what you are asking, you can do essentially the same thing by referencing cells that are not yet created.
For example:
Column C currently has 100 cells (100 rows in the sheet)
Instead of referencing it with C:C, use C1:C999
If you make the row reference high enough, then you can account for future rows that you will create. Hope it helps.
I don't think so... even if you select a column manually while in the Range Name selector, it complains. That would be a nice feature and it would make sense since they support column ranges for formulas already.
I believe this does work now. I have a range name of "Sheet1!A10:AW10" with no problems.
If you try to do a whole column, I think it will just take all the available cells in the column at that time. i.e. if you make more cells later, you need to manually add to the range name.
I had the same problem with ranges such as A3:A which normally work in other places such as ARRAYFORMULA(), but the workaround is to not specify the starting row, such as A:A. In cases when this would be a problem, you can proxy the data through another column using something like ARRAYFORUMULA(A25:A) as the formula.
Update: Apparently I haven't read the question properly. I see that the OP had tried leaving out the row number, so perhaps it wasn't working at that time, but it does now. The notations still don't work.
Update2: I didn't notice that google spreadsheet replaces ranges like A:A to A1:A50, so new rows added later on do not still get included. That I think is what #Dean is trying to say in his answer.
I think it's a helpful tool to use Insert -> Define new range to make a wizard appear and make the syntax correct. Hehe
My response in other topic

Resources