If text match in range conditonal formula Google Sheets error - if-statement

I'm trying to get a match in a range of text in Google Sheets basically I'm using this formula:
=IF(REGEXMATCH(H2:M2, "Hi"), "Yes", "No")
But I'm getting an error that is:

You are referencing an array in a function that is not designed to take arrays as input so you need to enable them.
Try:
=ArrayFormula(IF(REGEXMATCH(H2:M2, "Hi"), "Yes", "No"))
I'm trying to do this: =IF(("Hi"=H2:L2),"Approve","No qualify") =IF(("Here"= H2:L2),"Approve","No qualify")
Assuming E1:E2 is the list of values to check against A1:C1, you can try:
=ArrayFormula(if(countif(E1:E2,A1:C1),"Approved","Not qualified"))

Related

how to count how many Tuesdays and Wednesdays between two dates?

The input is an array [Tuesday, Wednesday] but it is should be stored in one cell only.
Using this input I want to know how many days between two dates.
I found a reference but I don't know how to make it as dynamic because it only accept integer weekday.
https://www.extendoffice.com/excel/formulas/excel-count-day-of-week-between-two-dates.html
SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(start_date&":"&end_date)))=week_day))
Someone knows how to achieve this?
EDITED: input is okay in any format as long as it should inside in one cell only
within sheets you can try:
For count:
=INDEX(LAMBDA(aix,COUNTA(IFNA(FILTER(aix,REGEXMATCH(TO_TEXT(WEEKDAY(aix)),JOIN("|",MATCH(SPLIT(REGEXREPLACE(A5,"\[|\]",""),", "),TEXT(SEQUENCE(7),"DDDD"),0)))))))(SEQUENCE(DATEDIF(A2,B2,"d")+1,1,A2,1)))
For list:
=INDEX(LAMBDA(aix,IFNA(FILTER(aix,REGEXMATCH(TO_TEXT(WEEKDAY(aix)),JOIN("|",MATCH(SPLIT(REGEXREPLACE(A5,"\[|\]",""),", "),TEXT(SEQUENCE(7),"DDDD"),0))))))(SEQUENCE(DATEDIF(A2,B2,"d")+1,1,A2,1)))
use:
=SUMPRODUCT(REGEXMATCH(TEXT(SEQUENCE(DAYS(B2, B1)+1, 1, B1),
"dddd"), REGEXREPLACE(A4, ", ?", "|")))

How to compare two formula (calculated) cells in Google Sheets

I am trying to compare two formula (calculated) cells in Google Sheets but I am getting: Error - Formula parse error.
The two cells are:
=IF(OR(ISBLANK(E5), ISBLANK(H5)),"", E5-H5)
=IF(OR(ISBLANK(E5), ISBLANK(J5)),"", E5-J5)
And the cell I am trying to compare them in is:
=IF(K5==K4, "yes", "no")
An help on how to compare these cells?
use just one = sign:
=IF(K5=K4, "yes", "no")
Tested your scenario and found out that if you have values on E5 and H5, then it works as long as it is numeric. Do something like
=IF(AND(ISNUMBER(E5), ISNUMBER(J5)), E5-J5, "")
So, if both cells are numbers, we subtract them, otherwise we have an empty value.

HOW TO MAKE IF AND SEARCH STATEMENT GOOGLE SPREADSHEETS

So i have dropdown (cells J23) and when the dropdown gets the number, i want to show the results number (which is percent cell).
I was use filter, search and if function.
When i was run the if function, it's work. But when i was combine it, it doesn't work.
Here's my function
=filter(F10:G,search(J23,IF(J23 < 10, J23, IF(J23 = 10, 10, IF(J23 > 10, J23))), F10:F))
If you need my excel, you can access my google sheets
Your spreadsheet goal is hard to understand from your current formula. I think that you want the following...
In K21:
=IFERROR(VLOOKUP(J21,F6:G8,2,FALSE))
In K23:
=IFERROR(VLOOKUP(J23,F10:G,2,FALSE))
try:
=ARRAYFORMULA(IFERROR(QUERY(TO_TEXT(A5:C), "where 9=9 "&
IF(I6="",," and lower(Col1) contains '"&LOWER(I6)&"'")&
IF(J6="",," and lower(Col2) contains '"&LOWER(J6)&"'")&
IF(K6="",," and lower(Col3) contains '"&LOWER(K6)&"'")), "no match"))

REGEXEXTRACT multiple values - Google Sheets

I have the following entries in ONE google sheets cell
12#xy.de; 123#xy.de; 1234#xy.de; ext!abc#def.de!; 321#xy.de; ext!def#abc.de!; 4321#xy.de;
Now I would like to create the following output (in one cell aswell) using formulas.
Expected Result:
abc#def.de; def#abc.de
I tried using REGEXEXTRACT but this function only return the first
match (abc#def.de)
Any proposals?
try:
=ARRAYFORMULA(TRIM(TEXTJOIN("; "; 1; IF(REGEXMATCH(
SPLIT(A1; ";"); "abc#def.de|def#abc.de"); SPLIT(A1; ";"); ))))

Exact match of string in pandas python

I have a column in data frame which ex df:
A
0 Good to 1. Good communication EI : tathagata.kar#ae.com
1 SAP ECC Project System EI: ram.vaddadi#ae.com
2 EI : ravikumar.swarna Role:SSE Minimum Skill
I have a list of of strings
ls=['tathagata.kar#ae.com','a.kar#ae.com']
Now if i want to filter out
for i in range(len(ls)):
df1=df[df['A'].str.contains(ls[i])
if len(df1.columns!=0):
print ls[i]
I get the output
tathagata.kar#ae.com
a.kar#ae.com
But I need only tathagata.kar#ae.com
How Can It be achieved?
As you can see I've tried str.contains But I need something for extact match
You could simply use ==
string_a == string_b
It should return True if the two strings are equal. But this does not solve your issue.
Edit 2: You should use len(df1.index) instead of len(df1.columns). Indeed, len(df1.columns) will give you the number of columns, and not the number of rows.
Edit 3: After reading your second post, I've understood your problem. The solution you propose could lead to some errors.
For instance, if you have:
ls=['tathagata.kar#ae.com','a.kar#ae.com', 'tathagata.kar#ae.co']
the first and the third element will match str.contains(r'(?:\s|^|Ei:|EI:|EI-)'+ls[i])
And this is an unwanted behaviour.
You could add a check on the end of the string: str.contains(r'(?:\s|^|Ei:|EI:|EI-)'+ls[i]+r'(?:\s|$)')
Like this:
for i in range(len(ls)):
df1 = df[df['A'].str.contains(r'(?:\s|^|Ei:|EI:|EI-)'+ls[i]+r'(?:\s|$)')]
if len(df1.index != 0):
print (ls[i])
(Remove parenthesis in the "print" if you use python 2.7)
Thanks for the help. But seems like I found a solution that is working as of now.
Must use str.contains(r'(?:\s|^|Ei:|EI:|EI-)'+ls[i])
This seems to solve the problem.
Although thanks to #IsaacDj for his help.
Why not just use:
df1 = df[df['A'].[str.match][1](ls[i])
It's the equivalent of regex match.