Google Sheets: CountIf and Dates - google-sheets

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))

Related

Google Sheet SUMIF returning an error! statement

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.

Why does vlookup not work with dates in Google Sheets

I have to find a value by date in Google Sheets between multiple tabs. I boiled it down and boiled it down until I made the most simple example I could find, and yet it still didn't work. Date notations are the same, the dates are a match, but still it reads like a number and returns an n/a. Made an example sheet, feel free to mess around
Example sheet
Or this
=index(C:C;MATCH(A6;D:D;0))
try like this:
=IFNA(VLOOKUP(A1; {D:D\ C:C}; 2; 0))

LOOKUP Function won't output correct value

I'm trying to create an Activity tracker for a game. However, I'm trying to use the LOOKUP function to track activity throughout 3 different sheets. However, the LOOKUP function does not seem to be outputting the correct value. LINK: https://docs.google.com/spreadsheets/d/1tdq6oeEFjgxJg6FXvSH2ZmkgRlHaFiD5aycjvezfNvc/edit?usp=sharing
If you look at Activity sheet, E2:E52, you should understand that it's outputting the wrong value(At least based on what I'm reading on the google docs).
I've tried converting this over to one sheet to see if that was the problem, however, it didn't work there either, I tried being more inclusive of the exact letter and number combination and that didn't help either.
I expect it to output the Attacks column for the username based on the Activity1 sheet.
Any help would be greatly appreciated.
PS: I tagged excel as it does the same exact thing on excel, however it gives slightly different values. I'm very confused.
use VLOOKUP instead:
=ARRAYFORMULA(IFERROR(VLOOKUP(D2:D,
{Activity1!C:D; Activity2!C:D; Activity3!C:D}, 2, 0)))

Conditional Formatting based on sum of the 6 cells below

I was Hoping to be fever along before i had to ask for help but.
using Google sheets i am trying to have a range of cells(a row specificity) change there background colour based on the Sum of the 6 cells directly below it in the
I know I am happy using the basic conditional forming and i have a formula witch will return true if the Sum = what i am looking for
=IF(SUM(D6:D11)=6,true,FALSE())
and this works if i copy and past it along but if i try to put it in the Custom formula is box i get told
There was a problem while
Cannot save the rule with invalid formula.
so i take it that i am not using the box right
any help would be greatly appreciated
Conditional formatting is ... conditional. There is not normally any need for IF(). Your formula should work as:
=Sum(D6:D11)=6
but over what range and what cells to format (other then D5) I can't help you, if required, without further details.
Please though do read the [google-spreadsheet] tag wiki.

CONCATENATE in ArrayFormula's IF statement in Google Sheets not

Make Google Spreadsheet Formula Repeat Infinitely helped me to expand my formula indefinitely and other StackExchange results helped me get to here:
=ARRAYFORMULA(IF((AF2:AF="")," ","L"&ROW(F2:F)&":AD"&ROW(F2:F)))
However, when I tell "L"&ROW(F2:F)&":AD"&ROW(F2:F) to CONCATENATE, every row gives a results as if it was CONCATENATE(L2:AD2).
I tried =ARRAYFORMULA(IF((AF2:AF="")," ",CONCATENATE("L"&ROW(F2:F)&":AD"&ROW(F2:F)))) and =ARRAYFORMULA(IF((AF2:AF="")," ",CONCATENATE(INDIRECT("L"&ROW(F2:F)&":AD"&ROW(F2:F))))) but neither are working.
I am trying to get each row to CONCATENATE(L2:AD2) then CONCATENATE(L3:AD3) then L4:AD4 and so on.
Any help is most appreciated.
To make more easy to explain and understand by using an example, assume that the source values are in the range A2:C3
Instead of using
ARRAYFORMULA(CONCATENATE(A2:C3))
use
ARRAYFORMULA({A2:A3&B2:B3&C2:C3})

Resources