Display blank instead of #NUM! error code - excel-formula

{=IF(ROWS(A$9:A223)<=A$1,INDEX(Tracker!A:A,SMALL(IF(Tracker!$R$3:$R$9610=A$2,ROW(Tracker!$A$3:$A$9610)),ROWS(A$9:A223))),"")}
I need the #NUM! not to show up. I can't figure out where the , "" goes. The function above is what I have so far. It is an Array. By the way, this works just fine. I just can't have the #NUM! showing up because count.... anything doesn't count it right. And what's up with Count counting the formulas in cells too?! Sorry, first question only. Thank you everyone!

Posting as answer from comments:
Use IFERROR like this:
=IFERROR(IF(ROWS(A$9:A223)<=A$1,INDEX(Tracker!A:A,SMALL(IF(Tracker!$R$3:$R$9610‌​=A$2,ROW(Tracker!$A$3:$A$9610)),ROWS(A$9:A223))),""),"")
HTH.

Related

Find date in range gives blank

I have the following formula:
=IFERROR((INDEX(TRACKER!$A$2:$A$500, SMALL(IF(AND($B$3<=TRACKER!$C$2:$C$500,$B$4>=TRACKER!$C$2:$C$500),ROW(TRACKER!$C$2:$C$500)-MIN(ROW(TRACKER!$C$2:$C$500))+1, ""), ROW($A1)))),"")
That pulls data depending on the beginning IF(AND( statement. I was trying to get it to pull dates that are between B3 and B4 (so, >=B3 but <=B4)
The problem is, it doesn't seem to like my AND statement and keeps pulling nothing (""). If I delete one of the statements in the AND and just pull >=B3 or <=B4, it works fine...so it's not a date formatting issue.
Would appreciate any way to incorporate date range into this array formula, thank you.
Perfect Scott, thank you very much as always for the swift and concise response. I replaced it with a "*" and it all worked out. Appreciate it.

EXCEL replace "False" with the word "NO"

I'm trying to print the word NO in the input if a condition is false. Here is what I'm currently trying
=IF (A2="a")AND(b2="b", "YES","NO")
It seems like this would work but I keep getting this error | Formula parse error.
I'm new to EXCEL and I have no idea what I'm doing wrong? Any help would be great Thanks!
You were close. Try this
=IF(AND(A2="a",B2="b"),"YES","NO")
Use If() and AND like this:
=IF(AND(A2="a",b2="b"),"Yes","No").
Pay special attention to the closing ) in And(), I've frustrated myself many times by forgetting that and wondering why my If formula wasn't working.
Format the cell with a custom format
[=1]"YES";"NO"
Then convert the formula result in the cell to an integer.
=INT(AND(A2="a",B2="b"))

Nested if formula (Excel)

Hi I am trying to write a formula where if cell (J$4) = 1120 then it would run one statement, whereas if cell (J$4) = 1120s it would run another. I am using index-match to lookup the appropriate value. However, I can't seem to get my formula to work and I was wondering if you guys can find my error. The error is 'you've entered too many arguments for this function'. Any help would be appreciated! Thank you!
formula:
=IFERROR(IF(J$4="1120S",INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5),IF(J$4=1120,INDEX(B1HY3!$A$3:$f$300,MATCH("L 22a",B1HY3!$f$3:$f$300,0),5)+INDEX(B1HY3!$A$3:$F$300,MATCH("L 22b",B1HY3!$F$3:$F$300,0),5),0),0)
Always try to follow parentheses' colors it is quite useful when handling with large formulas,furthermore try always to evaluate your formulas to check where the error is.
It worked for me:
=IFERROR(IF(J$4="1120S",INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5),IF(J$4=1120,INDEX(B1HY3!$A$3:$F$300,MATCH("L 22a",B1HY3!$F$3:$F$300,0),5)+INDEX(B1HY3!$A$3:$F$300,MATCH("L 22b",B1HY3!$F$3:$F$300,0),5))),0)
It was nessesary to close the parenthesis of the second if

Excel: Formula error when value is zero

I have used a formula to create a point system for my class. My formula is below, and it works great except that when C2 is zero, the score still shows "10" when I'd like it to be zero as well. I realize that this is an error in my formula but I can't seem to fix it without excel giving me an error message. Could anyone help me edit this formula to fix it?
(I'm a teacher and I'm just trying to make my life a little easier with excel.)
IF(TRIM(C2)="","",IF(C2<6.99,10,IF(AND(C2<=7.99,C2>=7),9,IF(AND(C2<=8.99,C2>=8),8,IF(AND(C2<=9.99,C2>=9),7,IF(AND(C2<=10.99,C2>=10),6,IF(AND(C2<=11.99,C2>=11),5,IF(AND(C2<=12.99,C2>=12),4,IF(AND(C2<=13.99,C2>=13),3,IF(AND(C2<=14.99,C2>=14),2,IF(AND(C2<=15.99,C2>=15),1,IF(AND(C2>=16,C2<=100),0))))))))))))
your first if statement says if c2 is nothing then its blank. why not make another one that check if its 0
This is untested but try
IF(TRIM(C2)="","",IF(TRIM(C2)=0,0,IF(AND(C2<6.99,10,IF(AND(C2<=7.99,C2>=7),9,IF(AND(C2<=8.99,C2>=8),8,IF(AND(C2<=9.99,C2>=9),7,IF(AND(C2<=10.99,C2>=10),6,IF(AND(C2<=11.99,C2>=11),5,IF(AND(C2<=12.99,C2>=12),4,IF(AND(C2<=13.99,C2>=13),3,IF(AND(C2<=14.99,C2>=14),2,IF(AND(C2<=15.99,C2>=15),1,IF(AND(C2>=16,C2<=100),0))))))))))))))
Again this is untested but hopefully you see what I am trying to do.
Perhaps:
=IF(C2="","",IF(C2=0,0,MAX(ROUNDUP(MIN(16-C2,10),0),0)))

Having a div/0 error in excel 2007 return a 0 with in a large formula

I apologize if this is not considered real programming since it is in Excel but I need help and this is the most helpful place I know!
Alright so I have a very large if formula in excel:
=IF(AND(($EZ16+LF$1139)>$B$1145,($EZ16+LF$1139)<$B$1146),IF(OR(AND($FB16<LF$1141,$FB16>LF$1142),AND($FE16<LF$1141,$FE16>LF$1142),AND($FH16<LF$1141,$FH16>LF$1142),AND($FK16<LF$1141,$FK16>LF$1142),AND($FN16<LF$1141,$FN16>LF$1142),AND($FQ16<LF$1141,$FQ16>LF$1142),AND($FT16<LF$1141,$FT16>LF$1142),AND($FW16<LF$1141,$FW16>LF$1142),AND($FZ16<LF$1141,$FZ16>LF$1142),AND($GC16<LF$1141,$GC16>LF$1142),AND($GF16<LF$1141,$GF16>LF$1142)),FALSE,(EU16/EI16-1)),FALSE)
What can I do to it so that if it returns a div/0 error it will pass a value of 0 instead of the #DIV/0! error?
Would it be something like:
=IF(ISERROR(A1/B1),0,A1/B1)
If so how can I add that to my current formula and not break it? Would it be:
=IF(ISERROR(IF(AND(($EZ16+LF$1139)>$B$1145,($EZ16+LF$1139)<$B$1146),IF(OR(AND($FB16<LF$1141,$FB16>LF$1142),AND($FE16<LF$1141,$FE16>LF$1142),AND($FH16<LF$1141,$FH16>LF$1142),AND($FK16<LF$1141,$FK16>LF$1142),AND($FN16<LF$1141,$FN16>LF$1142),AND($FQ16<LF$1141,$FQ16>LF$1142),AND($FT16<LF$1141,$FT16>LF$1142),AND($FW16<LF$1141,$FW16>LF$1142),AND($FZ16<LF$1141,$FZ16>LF$1142),AND($GC16<LF$1141,$GC16>LF$1142),AND($GF16<LF$1141,$GF16>LF$1142)),FALSE,(EU16/EI16-1)),FALSE))**),0,IF**(AND(($EZ16+LF$1139)>$B$1145,($EZ16+LF$1139)<$B$1146),IF(OR(AND($FB16<LF$1141,$FB16>LF$1142),AND($FE16<LF$1141,$FE16>LF$1142),AND($FH16<LF$1141,$FH16>LF$1142),AND($FK16<LF$1141,$FK16>LF$1142),AND($FN16<LF$1141,$FN16>LF$1142),AND($FQ16<LF$1141,$FQ16>LF$1142),AND($FT16<LF$1141,$FT16>LF$1142),AND($FW16<LF$1141,$FW16>LF$1142),AND($FZ16<LF$1141,$FZ16>LF$1142),AND($GC16<LF$1141,$GC16>LF$1142),AND($GF16<LF$1141,$GF16>LF$1142)),FALSE,(EU16/EI16-1)),FALSE))
Thank you for the help!
EDIT:
Tim a tried your suggestion:
=IF(AND(($EZ16+LF$1139)>$B$1145,($EZ16+LF$1139)<$B$1146),IF(OR(AND($FB16<LF$1141,$FB16>LF$1142),AND($FE16<LF$1141,$FE16>LF$1142),AND($FH16<LF$1141,$FH16>LF$1142),AND($FK16<LF$1141,$FK16>LF$1142),AND($FN16<LF$1141,$FN16>LF$1142),AND($FQ16<LF$1141,$FQ16>LF$1142),AND($FT16<LF$1141,$FT16>LF$1142),AND($FW16<LF$1141,$FW16>LF$1142),AND($FZ16<LF$1141,$FZ16>LF$1142),AND($GC16<LF$1141,$GC16>LF$1142),AND($GF16<LF$1141,$GF16>LF$1142)),FALSE,IF(EI16=1,0,EU16/EI16-1)),FALSE)
Still getting a #DIV/0 error, any idea why?
Excel 2007 has a new IFERROR function that you can use like
=IFERROR(MyLongFormula,0)
=IsError(100/0) will return TRUE, so make the conditional before to output 0, =IF(IsError(*),0,...)
I wouldn't recommend duplicating the whole formula like that: a complicated formula just got twice as complicated.
Since the division only happens in one place, I'd recommend putting the check there. This:
...(EU16/EI16-1)...
becomes this:
...IF(EI16=1, 0, EU16/EI16-1)...

Resources