IF Statement with Network days - if-statement

I'm trying to write a formula using an IF and Networkdays function. I basically want this formula to look in column J3 and see if there is a date. If there is a date the it should return the number of work days between the completion date and the discovery date.
If J3 (completion date) is blank, which means it hasn't benn completed, then I just want it to return blank

Try something like this:
=IF(J3 = "", "", NETWORKDAYS(A3, J3))
You already had 50% of the formula.
The IF statement will check whether or not J3 is blank (i.e. ""). If that is true, it will return a blank value. If it's false meaning that there is something in there, it will return your formula.
Let me know if that works.

Here is the formula that I use:
=IF(NETWORKDAYS($G7,$H7)>0, NETWORKDAYS($G7,$H7),"-")

Related

How to also populate "N/A" with If AND function in Google Sheets

My current formula populates Missed, Meets, Nearly Meets, and Exceeds. But I can't seem to figure out how to include "N/A" or create a blank cell in the formula.
My forumla so far:
=if(AND(L40>=14.5, L40<=16.4),"Nearly Meets", if(AND(L40>=4.5, L40<=14.4),"Meets", if(AND(L40>=15.5),"Missed","Exceeds")))
So, if L40 has any range of these number, M40 populates any of these Texts. How can I add to the formula so a blank cell populates "N/A" . Or, entering "TBD" in a cell leaves it blank or populates "N/A"
I'd rather use IFS formula or VLOOKUP here. It's short and clear.
=ifna(vlookup(B2,F2:G6,2,true),"value not found")
On a side you make a table of requirements and go through it using vlookup.
If you have no space anywhere in your sheet, you can also include value table into your formula using curly brackets:
=ifna(vlookup(B2,{0,"Missed";4.5,"Nealry Meets";14.4,"Meets";15.5,"Exceeds";"","Empty"},2,true),"value not found")
For values outside the set you can use IFNA formula.
If you use indentation before writing the final formula, it looks like this:
if(AND(L40>4.4; L40<=16.4){
"Nearly Meets";
}
else if(AND(L40>=4.5; L40<=14.4){
"Meets";
}
else if(L40>16.4){
"Missed";
}
else if(L40 = ""){
"N/A";
}
else {
"EXCEEDS"
}
Notice that I didn't use the condition if(L40<4.5), because a blank cell can be interpreted as 0, which is always less than 4.5, so you would never reach the N/A condition. By better determining your ranges, it gets easier to escape the exceeds case. It may not be your case, but if you had 2 or more digits after the decimal point, it could give you an unexpected result.
That said, you can now use the formula as
=if(AND(L40>4.4, L40<=16.4), "Nearly Meets", if(AND(L40>=4.5, L40<=14.4), "Meets", if(L40>16.4, "Missed", if(L40 = "", "N/A", "EXCEEDS"))))

Highlighting a whole row if number of blank cells in the row = a certain number

I'm trying to highlight a row if the number of blank cells between say, C1 and E1 = 3
and then copy this down for every row.
I've tried using:
=IF(COUNTBLANK($C1:$E1)=3)
But it's not working, can anybody help?
Under conditional formatting, your formula should be the following based on what you've given. The reason is conditional format is trying to see the result as TRUE or False. The IF statement is trying to tell the computer what to do when it's TRUE or FALSE.
COUNTBLANK($C1:$E1)=3
if you want to use IF you will need to do it like this:
=IF(COUNTBLANK($C1:$E1)=3, 1)

Google Sheets IF statement with OR logic error?

The formula I created for a Google Sheet is not working. Seems to be a logic error but I'm not sure what I'm doing wrong here.
This formula is being entered into F3:
=IF(OR(C3="",D3="",E3=""), "", TODAY())
I thought this would do it. If C3 is blank OR D3 is blank OR E3 is blank, then leave the cell blank, else show today's date. It's treating it like an AND statement and only putting today's date if all three cells (C3, D3, E3) have something in them.
this pretty much works. perhaps try:
=IF(OR(C3=""; D3=""; E3=""); ; TODAY())
perhaps you need AND:
=IF(AND(C3=""; D3=""; E3=""); ; TODAY())
I figured it out. My logic was off. I needed an AND not an OR because if any of the cells were = "" the OR was TRUE and therefore "" unless all were filled in
Correct formula:
=IF(AND(C3="",D3="",E3=""), "", TODAY())

IF AND Formula with IS NOT NULL in Excel

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")

Crystal Reports Else If statement

I can't figure out why this if statement won't work.
I have a DateTime field DATEFROM and a String parameter (it HAS to be String) periodEnd.
I would like to calculate percentages depending if these two dates have 1, 2, 3 or more years difference.
When I use this formula I get either "100%" or "-" and never the other two options. It's like CR calculates the first IF and if it's true then: "100%" but if it's false, it never checks for the rest of the Else Ifs and goes dirreclty to Else
StringVar percentage:="";
If (cDate({?periodEnd})-{TABLE.DATEFROM})<=1 Then
percentage:="100%"
Else If (cDate({?periodEnd})-{TABLE.DATEFROM})<=2 Then
percentage:="66%"
Else If (cDate({?periodEnd})-{TABLE.DATEFROM})<=3 Then
percentage:="33%"
Else
percentage:="-"
Any idea?
a) I assume you already made sure your periodend format matches with what cdate interprets?
If you just subtract them, Crystal by default returns the number of days between.
Two ways you can do year:
datediff("yyyy",cDate({?periodEnd},{TABLE.DATEFROM})
or
year(cDate({?periodEnd})-year({TABLE.DATEFROM})
b) You've also no doubt accounted for when your {TABLE.DATEFROM} is greater than cDate({?periodEnd} and you have a negative result?
Not sure if the following is the behavior you would want, but I'm throwing it in for your information
ABS(datediff("yyyy",cDate({?periodEnd},{TABLE.DATEFROM}))
**make sure you check the help file for the datediff codes ("yyyy" etc) as they are not quite instinctive and can trip you up when you think you're using the obvious one