How to put AND statement within a IF Vlookup & ISNA formula - if-statement

I would like to put an AND statement within the below formula but I keep getting the error "You have entered too few arguments", is anyone able to help please?
=IF(ISNA(VLOOKUP(A2,$D$2:$D$4,1,FALSE)),"No","Yes")

Replace commas with semicolons and use AND function in IF condition.
Worked for me in google sheets.
=IF(AND(ISNA(VLOOKUP(A2;$D$2:$D$4;1;FALSE)); TRUE);"No";"Yes")
Hope it helps!

Related

Arrayformula to check if column contains text and pull the number next to it. Google Sheets

In desperate need of some assistance with this!
Wasn't sure how to title this question...
SAMPLE SHEET - CLICK ME! :)
In SupportingSheet!H1 I have the following formula:
=ArrayFormula(if(G1:G<>"", IF(DASHBOARD!N2<>"", G1:G/DASHBOARD!$P$2-filter(DASHBOARD!O1:O100,REGEXMATCH(DASHBOARD!N1:N100,E1:E100)),G1:G/(DASHBOARD!$M$3)),))
The part I struggle with is:
G1:G/DASHBOARD!$P$2-filter(DASHBOARD!O1:O100,REGEXMATCH(DASHBOARD!N1:N100,E1:E100))
It needs to divide two numbers and then subtract another number. I can't seem to get this formula to pull the correct number.
It needs to check if the text in E1:E100 exist in DASHBOARD!N1:N100, if yes, pull the number from DASHBOARD!O1:O100.
For example, text in SupportingSheet!E1 can be found in DASHBOARD!N2, hence it needs to pull the number from DASHBOARD!O2.
Column SupportingSheet!J has the actual end result that a formula needs to produce.
It doesn't look like Regexmatch works as an Arrayformula and I am not sure how to go about it.
Please note, that text in SupportingSheet!E1:E is not always identical. Often it will have a random number of "space" at the end (long story...). That is why Regexmatch was a perfect option until I realised it didn't work.
Please let me know if further clarification is needed.
Below is an image of the random spaces (non-printable characters) at the end.
use:
=ARRAYFORMULA(IF(G1:G="",,IF(DASHBOARD!N2<>"",
IFNA(G1:G/DASHBOARD!$P$2-VLOOKUP(E1:E1000, DASHBOARD!N1:O100, 2, 0),
G1:G/DASHBOARD!$M$3))))

Using IFS and REGEXMATCH Fails

I'm trying to use the following IFS statement
=IFS(REGEXMATCH(B2,"football"),"brown",REGEXMATCH(B2,"baseball"),"white")
but Google Sheets keeps saying the syntax is wrong. What is wrong with this?
Column B is a text column.
Other similar posts did not work for me.
The formula works fine.
You probably need to change it (depending on your locale) to:
=IFS(REGEXMATCH(D2;"football");"brown";REGEXMATCH(D2;"baseball");"white")
Another improvement you may make is to wrap it in the IFNA function
=IFNA(IFS(REGEXMATCH(D2,"football"),"brown",REGEXMATCH(D2,"baseball"),"white"),"No match")

Trying to create a field in Google Data Studio that only counts if the name of a list begins with US

I am trying to create a field in Google Data Studio that sums the revenue for lists that begin with US. I know I have to use regex, but it continue to tell me there is an unexpected end to the formula.
Here is the code.
Revenue WHERE REGEXP_MATCH(List, '^US')
Please let me know if you have any questions.
Thanks!
You can use
WHERE REGEXP_MATCH(List, '^US.*')
^^
Or even
WHERE REGEXP_MATCH(List, 'US.*')
See REGEXP_MATCH documentation:
REGEXP_MATCH attempts to match the entire string contained in field_expression. For example, if field_expression is "ABC123":
REGEXP_MATCH(field_expression, 'A') returns false.
REGEXP_MATCH(field_expression, 'A.*') returns true.

how to build regular expressions

I'm dealing with some google spreadsheet with data, some of which is in a very confused way, but regular, so i hope we can figure this out.
I've tried reg ex builders but I can't find the right one for google sheets or I misunderstand some stuff.
I would appreciate help with these sentances below:
1. {"user":{"Czy faktura?":"Y","Nazwa firmy":"Name of the company ","NIP":"113 234 20 57"}}
2. {"user":{"Czy faktura?":"Y","Nazwa firmy":"The longer name of the company","NIP":"2352225961"}}
3. {"user":{"Czy faktura?":"N","Nazwa firmy":"","NIP":""}}
The point is to extract: (using arrayformula in google sheets)
Y or N
Name of the company
NIP number
Problems:
The name of the company has different lengths, and the NIP number is sometimes with white-spaces.
Do you guys have any idea how can I properly use it?
I know it's the REGEXEXTRACT formula of course :)
Just have a problem on how to formulate the regular expression..
=regexreplace(B1, "(^.*Nazwa firmy"":"")(.*)("",""NIP.*$)", "$2")
Well the support was fantastic :)
After all, a simple "Y|N" solves the first problem
I used #ttarchala's solution for the company name as it seems to work for some reason - i don't know why or how :)
"(^.Nazwa firmy"":"")(.)("",""NIP.*$)", "$2"
and the NIP is isolated by this one: "NIP\"":\""(.+)\"""),"-|\s","" and later trimmed of off the "-" minus and whitespaces signs.
cheers

Trying to replace the evaluate function. Having an issue with 1 particular case

I am having a heck of a time trying to figure this out. I'm trying to replace this evaluate function.
<cfoutput>
#evaluate('#qry#.#editVal#')#
</cfoutput>
But I just can't seem to work it out. Both qry and editVal are in the variables scope and when using evaluate it returns a value for instane the value of
#qryVitals.PULSE#
I just can't seem to get the notation right to interpret it. Any help would be greatly appreciated.
#evaluate('#qry#.#editVal#')# is equivalent to #VARIABLES[qry][editVal]#.
As noted by #Leigh, if VARIABLES[qry] is of type query, you have to specify the row number as well, e.g. #VARIABLES[qry][editVal][1]#.