Google Sheet SUMIF returning an error! statement - google-sheets

pretty new to google sheets, my question could seems awkward but i'm struggling with a sumif in google sheets.
I'm using a sumif to sum up some values with a simple condition and i struggle to find the right way to do it. Assuming the documentation i do it well but i must be missing something because the result is always : ERROR!
See the example below
The example is simple, applying exactly what the documentation says but still not working.
I tried to make the cell format number for the condition, still not working.
I tried to make the condition a string by typing "=1", still not work. I tried to use a cell value in the condition B5 for example, still not working.. I'm desperate, i don't understand why this simple example is still not working.
If someone could help it will save my time.

Chances are that your spreadsheet is using a locale that expects formula arguments to be separated with semicolons instead of commas, like this:
=sumif(B5:B10; 1; C5:C10)
You can set the locale in File > Settings > Locale.

Related

Conditional formatting that used to work in Google Sheets, not anymore

A few months back I used to use a conditional formatting to highlight duplicates in a column. The formula I used is: =COUNTIF(A:A, A1)>1.
It doesn't seem to be working anymore. When I try to add this as the custom formula, I get an error message: Invalid formula. I even opened a few older sheets to check, it still works on them. Any tips?
General Grievance's comment:
Change the , to a ;. I think your sheet might be in a different locale.

Conditional formatting using countif() with values from an external spreadsheet

I have a Google sheet the references values from another and using conditional formatting, it marks down the cells with the same value. Within the same document, I use the following code:
=countif(indirect("Responses!D2:D103"),A1)=1 That works great.
However, I try to get the same result referencing the same sheet from an external spreadsheet to no avail. I feel like I tried all the combinations of IMPORTRANGE and INDIRECT out there, similar to this: =countif(importrange("sheet_url",indirect("Responses!$D$2:$D$103")),A1)=1
I'm sure I'm missing some small detail, I just can't tell what it is.
try:
=INDEX(COUNTIF(IMPORTRANGE("1ddqnVB9eDkk2tCadotN0NQlZdJDzIX4UyEEuXVs99nk",
"Responses!D1:D103"), A1)=1)
note that access needs to be granted first in order for this to work

Google Sheets - Parse Number / Currency

I have a spreadsheet in Google Sheets. I have a column with a set of strings e.g. '£3.36'. Now I wish for these to be treated as a number/currency and not as a string, as I am unable to mathematically manipulate them otherwise.
I have tried removing the £ by using =Right() and =LEN(), but unfortunately, sheets still considers them to be a string.
I have tried changing the format of the cell and selecting currency, but this does not work either.
I have also tried =TO_PURE_NUMBER(), but this didn't work for me either.
Has anybody got any suggestions?
All help is appreciated.
Scratch that. =right(x,len(x)-1) does actually work!

Google Sheets: CountIf and Dates

Haven't gotten any help through the Google Product Forums, so I'll try here. I've never had issues with this before so not sure what I'm missing now. I can't seem to make a rather simple formula work and I have no idea why.
For some reason, =COUNTIF(SCHEDULE!$C$9:$C29,">="&B$2) returns 0, when I'm expecting it to return 21.
In B2 is the date "6/25/2018", which is actually a reference to
SCHEDULE!C2.
Am I just not understanding the logic correctly? "If the dates in C9:C29 are after or equal to 6/25/2018, then count them."
When I try it as <= it doesn't work either.
I don't think there is an issue with the dates being formatted using TEXT(B2,"MM/DD/YYYY") because other formulas seem to be working fine.
Alternatively, I also tried using SUM(QUERY), but that also got hung up when using the dates.
=sum(query(SCHEDULE!A9:AB,"select count(F) where F='2004' and C >= date '"&TEXT(DATEVALUE(B2),"yyyy-mm-dd")&"'",0))
You can see a test version of the sheet HERE.
I am working from the REF sheet.
You can see what I've tried in Z6, Z7, Z8 and AA6.
Any suggestions would be appreciated. I feel like I'm missing something obvious. I'm not sure if it's the fact that some of the dates from the SCHEDULE page are rendered using TEXT, but I can't figure this out.
Ref!B2 is TEXT(SCHEDULE!$C$2,"MM/DD/YYYY"). You cannot compare text-that-looks-like-a-date to true dates.
The best option is to use =SCHEDULE!$C$2 in REF!B2 and format the cell as mm/dd/yyyy.
The bandaid (dig a hole then fill it up) is to adjust your COUNTIF to,
=COUNTIF(SCHEDULE!$C$9:$C29,">="&DateValue(B$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.

Resources