So I'm really bad at this stuff, can someone rewrite this for me. Basically when Status is completed I need to add a "new due date" to column based off a "Completed Date" but only for column that has "JCN Type" that is equal to EA or TA. Once I have the IF statement I can change it for my other JCN Types.
=IF([Status] is “Completed” IF [JCN Type] is “EA OR TA” THEN(addDays from[DateCompleted]add 15[FSAR Due]))
=IF([Status] is “Completed” IF [JCN Type] is “EDLM OR UDLM” THEN(addDays from[DateCompleted]add 10 to[FSAR Due]))
Related
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!", )))
Source data:
Market Platform Web sales $ Mobile sales $ Insured
FR iPhone 1323 8709 Y
IT iPad 12434 7657 N
FR android 234 2352355 N
IT android 12323 23434 Y
Is there a way to evaluate the sales of devices that are insured?
if List.Contains({"iPhone","iPad","iPod"},[Platform]) and ([Insured]="Y") then [Mobile sales] else "error"
Something to that extent, just not sure how to approach it
A direct answer to your question is
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
SumUpSales = Table.AddColumn(Source, "Sales of insured devices", each if List.Contains({"iPhone","iPad","iPod"}, _[Platform]) and Text.Upper(_[Insured]) = "Y" then _[#"Mobile sales $"] else null, type number)
in
SumUpSales
However, I would like to stress you few things.
First, it's better to convert values in [Insured] column to boolean first. That way you can catch errors before they corrupt your data without you noticing. My example doesn't do that, all it does is negating letter case in [Insured], since PowerM is case-sensitive language.
Second, you'd better use null rather than text value error. Then, you can set column type, and do some math with its values, such as summing them up. In case of mixed text and number values you will get an error in this and many other cases.
And last.
It is probably better way to use a pivot table for visualizing data like this. You just need to add a column which groups all Apple (and/or other) devices together based on the same logic, but excluding [Insured]. Pivot tables are more flexible, and I personally like them very much.
I have a question about Open Refine's IF statement GREL. I have two columns, one is "Address" and the other is "House Code". I'd like to create an If-Then statement that would say something like:
IF("Address", "Building D", 1004)
So, if the address is "Building D", the second column "House Code" would return 1004. While I know that this is very easy to accomplish in Excel, I haven't found the correct GREL equation yet...
I would appreciate any help...
The logic of an if in OpenRefine is about the same as in Excel: if(condition, what to do if the condition is true, what to do if the condition is false).
In your case you could create the column "House code" with this Grel formula:
if(value=="Building C", "1004", null)
As a reminder, value is a variable that refers to the contents of each cell in your column.
Demo :
If the "House code" column already exists, you can transform it with this formula :
if(cells.Adress.value=="Building C", "1004", null)
Demo :
In a Google Sheet I want to compare two dates and check if either one (Plan start date, actual start date) is blank. It should show the text "not started" then. If not if(plan start date <Actual start date) show as Delay else "Inline":
=if((DAYS360(D8,C8)<0,"Delay","Inline",IF(ISBLANK(D8),"Not started")))
This didn't work. Can anyone help?
Try this
=IF(DAYS360(D8;C8)<0;"Delay";IF(ISBLANK(D8);"Not started";"Inline"))
Use semicolons in Excel, not commas. Also, the IF conditionals are written like this:
=IF(condition; value if true; value if false)
If you write more than 3 parameters it just won't work. You can put an IF inside of a value parameter so you nest two IFs (or as many as you wish)
EDIT: ok I thought it was an Excel and not a google spreadsheet. Maybe there you can use commas. The rest is the same though, you had a mistake in the IF statement. =IF(DAYS360(D8;C8)<0,"Delay",IF(ISBLANK(D8);"Not started","Inline")) should do the work.
You have a syntax error:
=if(
(
DAYS360(D8,C8)<0,
"Delay",
"Inline",
IF(
ISBLANK(D8),
"Not started"
)
)
)
Your outer IF has 4 arguments, while the proper syntax is: IF( condition, result if true, result if false) and the 3rd argument is optional.
EDIT: As far as I understand, you might want to achive something like this:
IF(
OR(ISBLANK(C8), ISBLANK(D8)),
IF(
ISBLANK(C8),
"first is blank",
"second is blank"
),
"none of them is blank"
)
And in the "none of them is blank" case you may want to place an additional IF examining DAYS360(C8, D8).
I am using Excel 2010 and currently trying to get a formula for my data using a Nested If And, but unable of the correct formula.
Here is some sample data to elaborate on my point:
(A1) Received Date (B1) DueDate
(A2) 7/1/2016 (B2) 7/8/2016
(A3) 7/1/2016 (B3) 6/29/2016
(A4) 7/1/2016 (B4) NULL
Basically, I want to create a formula that satisfies the following conditions. If Received Date < DueDate AND DueDate IS NOT NULL...then "YES", else "NO". So in this sample code above, only the first record should return "YES" and the other two should return "NO."
How do I do about a formula doing this?
I don't know how to do the second condition, the IS NOT NULL part. I put the cell numbers in parenthesis to simulate the table. (Hope that helps.)
Excel does not have a function to test for null. You can use IsBlank() to check for a blank cell or you can use IsNumber() to check for a numeric value. So, in your case something like
=if(and(isnumber(B2),A2<B2),"something","else")
Edit: If you want to check for the text "Null", then
=if(and(B2<>"Null",A2<B2),"something","else")
= is the "equals" comparison operator. "Not equals" is done with the <> comparison operator. Or you could do Not(B2="Null") but that's a bit too curly.
Another edit: FWIW, the first formula should still work, regardless of the cell containing text or being blank. As soon as the cell contains a date (which is a numeric value), the condition will be TRUE. So you can use that formula as well.
=IF(AND(B2<>"NULL",A2<B2),"YES","NO")