I am trying to get the following statement to work.
=IF(N3=100, (=concatenate("Text",A3;)), "Result").
Keep on coming with an error.
Any ideas please?
Do this instead:
=IF(N3=100, concatenate("Text",A3), "Result")
you can simply do it like:
=IF(N3=100, "Text "&A3), "Result")
Related
=SUM(H33:H41)+SUM(I33:I41)+ FILTER(Transactions!F:F,Transactions!C:C="Deposit")
The snippet above works fine, but I am getting errors when I try to add a filter for "Withdrawal".
=SUM(H33:H41)+SUM(I33:I41)+FILTER(Transactions!F:F,Transactions!C:C="Deposit")+FILTER(Transactions!F:F,Transactions!C:C="Withdrawal")
use:
=SUM(H33:I41)+FILTER(Transactions!F:F, REGEXMATCH(Transactions!C:C, "Deposit|Withdrawal"))
How to make my ARRAYFORMULA(A1 + something else) to stop producing results after there are no more values in A1 column, eg. to skip blank values. By default it gives endlessly "something else".
Here is my demo sheet:
https://docs.google.com/spreadsheets/d/1AikL5xRMB94BKwG34Z_tEEiI07aUAmlbNzxGZF2VeYs/edit?usp=sharing
Actual data in column A1 is regularly changing, rows are being added.
I tried the others and they didn't work. This does though:
=ARRAYFORMULA(filter(A1:B;A1:A<>"";B1:B<>""))
use:
=ARRAYFORMULA(IF(A1:A="";;A1:A+1000))
You can try this formula =ARRAYFORMULA(IF(ISBLANK(A1:A),"",(A1:A + B1:B))) if this works out for you.
Reference:
https://support.google.com/docs/answer/3093290?hl=en
I have a spreadsheet where I look if the data (website) already exist on the master sheet.
=if(countif(importrange("Spreadsheet Key","Leads!N:N"),K2)>0,"COMPANY EXISTS!","")
But the above formula is not dynamic enough. If there are companies with co.uk and on the master sheet if it's registered under .com, it won't show "COMPANY EXISTS!"
So I changed to the formula to look for works after before and after "." on a website.
=ARRAYFORMULA(REGEXEXTRACT(UNIQUE(SUBSTITUTE(importrange("Spreadsheet Key","Leads!N:N"),"www.","")), "([0-9A-Za-z-]+)\."))
But it's not working if I try to incorporate with if and countif.
=if(COUNTIF(ARRAYFORMULA(REGEXEXTRACT(SUBSTITUTE(importrange("Spreadsheet Key","Leads!N:N"),"www.",""), "([0-9A-Za-z-]+)\."),L2:L)>0,"Company Exist!",""))
It shows 'Wrong number of arguments to IF. Expected between 2 and 3 arguments, but got 1 arguments'
Can anyone help me out on where I am making the mistake?
Spreadsheet link- https://docs.google.com/spreadsheets/d/1La3oOWiM5KpzRY0MLLEUQC25LzDuQlqTjgFp-VlS8Bo/edit#gid=0
Edited: Made a mistake beforehand, didn't specify on that cell its looking against
Your formula had a typo. You are not closing the Arrayformula and the Countif correctly (the array formula closing parenthesis should go before the , of the count if). So change this:
=if(COUNTIF(ARRAYFORMULA(REGEXEXTRACT(SUBSTITUTE(importrange("Spreadsheet Key","Leads!N:N"),"www.",""), "([0-9A-Za-z-]+)\."),L2:L)>0,"Company Exist!",""))
To this:
=if(COUNTIF(ARRAYFORMULA(REGEXEXTRACT(SUBSTITUTE(IMPORTRANGE("Spreadsheet Key","Leads!N:N"),"www.",""), "([0-9A-Za-z-]+)\.")),L3:L)>0,"Company Exist!","")
I hope this has helped you. Let me know if you need anything else or if you did not understood something. :)
try:
=ARRAYFORMULA(IFNA(IF(IFNA(REGEXEXTRACT(SUBSTITUTE(IMPORTRANGE(
"1bnz7Y_xVN9Jo80aCBBeMBMJBnMDHkbZQUWnmL20CRi8", "Leads!N:N"),
"www.", ), "([0-9A-Za-z-]+)\."))>0, "Company Exist!", )))
Please help. I'm trying to get the cell to return blank but I'm having trouble.
=IF(AND($I2>1,AG2>=0.5),1,IF(AND($I2<1,AG2<0.5),1,IF(AG2=""),"",0))
There's and error message when I include the last argument IF(AG2=""),"",0.
This alternative hasn't worked either =IF(ISBLANK(AG2),"",IF(AND($I2>1,AG2>=0.5),1,IF(AND($I2<1,AG2<0.5),1,0)))
I've also tried with using IFERROR to return blank rather than DIV/O which ruins my pivot table. Thanks so much
Perhaps:
=IF(AND($I2>1,AG2>=0.5),1,IF(AND($I2<1,AG2<0.5),1,IF(AG2="","",0)))
Your error was parenthetical.
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.