Combining AND statements with regexmatch - google-sheets

I'm trying to create a formula in Google Sheets that will spit out 'True' or 'False' based on certain conditions.
I'd like the formula to spit out "True" if all the conditions below are met:
Cell B14 contains either of the terms: "affinity|perception|perceptions|awareness|familiarity"
Cell B53 is checked off (the cell has a check box)
Cell B54 is checked off
I have this formula, below, but it doesn't seem to be doing what i want.
=IF((B53="true" AND( B54="true")),regexmatch(B14,"affinity|perception|perceptions|awareness|familiarity"))
thanks in advance for the help!

Try
=and(B53<>"true", B54<>"true",regexmatch(B14,"affinity|perception|perceptions|awareness|familiarity"))

I think by 'checked off' you mean that the checkbox is ticked? In this case
=and(B53,B54,regexmatch(B14,"affinity|perception|perceptions|awareness|familiarity"))
although you don't need to specify "perception" as well as "perceptions" because "perception" will pick up both.

Related

How to check multiple ranges for different values in Google Sheets

I'm trying to search 3 different ranges in a tab, and trying to display Yes if all three values (email address, name, x) are found in those ranges. Basically, trying to have the formula confirm that yes, all three of those inputs are somewhere in those ranges (order doesn't matter).
Maybe I should use query or regexmatch or something? Any help is appreciated
Tried this formula:
=IF(AND('Helper Calculations'!$I:$I=$A$1,'Helper Calculations'!$J:$J=L$1,'Helper Calculations'!$L:$L=$A2),"Yes","No")
Was expecting that if the search term in each of those cells ($A$1, L$1, $A2) is found somewhere in the corresponding ranges, then it would say Yes
You can try with this (you can change the use of asterisks by wrapping in AND:
=IF(COUNTIF('Helper Calculations'!$I:$I,$A$1)*COUNTIF('Helper Calculations'!$J:$J,L$1)*COUNTIF('Helper Calculations'!$L:$L=$A2),"YES,"NO")
try:
=INDEX(IF(('Helper Calculations'!I:I=A1)*
('Helper Calculations'!J:J=L1)*
('Helper Calculations'!L:L=A2), "Yes", "No"))
Took a bit more work than I expected, but I got this working. I needed to verify that all 3 values were correct in a single row (must all be correct on that one row, can't find the correct values on multiple rows).
In order to do that, I needed to use array formula, and then decided to use index match and concatenate for the 3 values.
Process described here: https://www.ablebits.com/office-addins-blog/google-sheets-index-match/
correct formula: =IF(ArrayFormula(INDEX('Helper Calculations'!$I:$I,MATCH(CONCATENATE($A$1,L$1,$A2),'Helper Calculations'!$I:$I&'Helper Calculations'!$J:$J&'Helper Calculations'!$L:$L, 0),))=$A$1,"Y"))

Remove ,0000 number format from multiple formula on one cell

Hello stackoverflow i want to ask about how to remove those ,00000 (on screenshot above) im using multiple formula and "Format > Number > option" doesnt work for me
Thank you
You can use =ROUND() or =ROUNDDOWN() function to remove the decimal.
Your AVERAGEIF formula should look like this:
=ROUND(AVERAGEIF($B$13:$B;"Pragmatic Play";$E$13:$E))
OR
=ROUNDDOWN(AVERAGEIF($B$13:$B;"Pragmatic Play";$E$13:$E))
Example:
References:
ROUND
ROUNDDOWN
For currency values you can also use =DOLLAR() (depending on spreadsheet's local setting) which allows you do determine the number of decimals:
=DOLLAR(AVERAGEIF($B$13:$B;"Pragmatic Play";$E$13:$E);2)&" (other things)"

Selecting $M:$M and $N:$N returns "Array arguments to COUNTIFS are a different size"

I've simplified the code below for readability, after verifying that the other parts of the code do work. When I select a specific range, it works, but selecting the entirety of the M and N columns said that there are different array sizes.
I've checked the range, and both have their last cells at the same mark, so I'm not sure what the issue may be.
Please let me know if there's anything that is sticking out to you :)
=countifs("New Leads!"$M:$M), NameCell,"New Leads"!$N:$N),Value)
this is the correct syntax:
=COUNTIFS('New Leads'!M1:M, "NameCell", 'New Leads'!N1:N, 1)

arrayformula with ifs, isblank and AND/OR in google sheets

What I am trying to achieve is a formula that checks the top row for "all are blank" or "all are not blank" in specified ranges. Depending on the conditions the cell with the formula gives back 1 of 3 words or leaves it blank.
I further illustrate this with the colours in the following images
The formula I have so far:
=ArrayFormula(ifs((not(isblank(A1:B1*C1:E1*G1:I1))*(isblank(J1:L1*N1:P1))),"SEND",
not(isblank(A1:B1*J1:L1*N1:P1))*isblank(C1:E1*G1:I1),"RECEIVE",
not(isblank(A1:B1*C1:E1*G1:I1*J1:L1*N1:P1)),"TRANSFER",
ISBLANK(A1:B1+C1:E1+G1:I1+J1:L1+N1:P1),""))
I don't understand what is wrong with the formula. As for example in the case when J1:L1*N1:P1 are filled, isblank(J1:L1*N1:P1) returns false when i want that to be true.
Here are the individual IF statements:
=IF((COUNTIF(A1:E1,"?*")=5)*(COUNTIF(G1:L1,"?*")=6)*(COUNTIF(N1:P1,"?*")=3)=TRUE,"TRANSFER","")
=IF((COUNTIF(A1:E1,"<>")=5)*(COUNTIF(G1:I1,"<>")=3)*(COUNTIF(J1:L1,"")=3)*COUNTIF(N1:P1,"")=3,"SEND","")
=IF((COUNTIF(C1:E1,"")=3)*(COUNTIF(G1:I1,"")=3)*(COUNTIF(J1:L1,"<>")=3)*COUNTIF(N1:P1,"<>")=3,"RECEIVE","")
Here are the nested IF statements.
=IF((COUNTIF(A1:E1,"?*")=5)*(COUNTIF(G1:L1,"?*")=6)*(COUNTIF(N1:P1,"?*")=3)=TRUE,"TRANSFER",IF((COUNTIF(A1:E1,"<>")=5)*(COUNTIF(G1:I1,"<>")=3)*(COUNTIF(J1:L1,"")=3)*COUNTIF(N1:P1,"")=3,"SEND",IF((COUNTIF(C1:E1,"")=3)*(COUNTIF(G1:I1,"")=3)*(COUNTIF(J1:L1,"<>")=3)*COUNTIF(N1:P1,"<>")=3,"RECEIVE","")))
So with the help of Nate I came up with the following formula:
=IFS(ISODD((COUNTBLANK(A1:E1)=0)*(COUNTBLANK(G1:L1)=0)*(COUNTBLANK(N1:P1)=0)),"TRANSFER", (ISODD((COUNTIF(A1:E1,"<>")=5)*(COUNTIF(G1:I1,"<>")=3)*(COUNTIF(J1:L1,"")=3)*COUNTIF(N1:P1,"")=3)),"SEND",ISODD((COUNTIF(C1:E1,"")=3)*(COUNTIF(G1:I1,"")=3)*(COUNTIF(J1:L1,"<>")=3)*(COUNTIF(N1:P1,"<>")=3)),"RECEIVE",true,"")

Google Sheets count how many cells contain a specific word / words?

I'm trying to look at all cells in a set of columns/cells to count how many of them contain the word WORDHERE (in this example)
I've tried using:
=SUM(COUNTIF(A1:A100, "WORDHERE"))
However this finds 0 as the cell contains other words/letters/numbers, if the cell only contains WORDHERE it works perfectly.
I've tried using several regeexxtract and regexmatch including the actual word as you can see below:
=SUM(COUNTIF(A1:A100,REGEXEXTRACT(A1:A100, "WORDHERE")))
But again, it finds 0 matches.
What am I doing wrong?
Not exactly answering what you are doing wrong, but here is what you can do:
=COUNTIF(A1:A100, "*WORDHERE*")
You don't need SUM around the COUNTIF.
=COUNTIF(A1:A100, "*WORDHERE*")
will work just as fine. The same can indeed be achieved with regexmatch in a more complicated formula:
=sum(ArrayFormula(N(regexmatch(A7:A, "WORDHERE"))))
Here N-function is used to 'convert' the boolean values (TRUE or FALSE) to 1 or 0.

Resources