Excel 2013 - Nested IF(ISERROR(SEARCH not 'seeing' final statement - excel

I'm struggling to see why the below isn't working for the final statement:
=IF(ISERROR(SEARCH("Investment Commentary",E73)), IF(ISERROR(SEARCH("Quarterly Update",E73)),"Quarterly Update"),"Investment Commentary")
So in Column C is my formula, and Column E contains text I'm searching.
My original formula has 12 of these and they all work, except for the last one.
I thought perhaps I'd hit a limit, but for some reason it refuses to see the final IF statement and simply returns FALSE.
Any help would be much appreciated!

Your first IF has a TRUE and FALSE part.....but the TRUE part consists of an IF statement with no FALSE part, so if the first IF is TRUE and the second is FALSE you get FALSE, you need to put something where I've indicated:
=IF(ISERROR(SEARCH("Investment Commentary",E73)), IF(ISERROR(SEARCH("Quarterly Update",E73)),"Quarterly Update","Something Here"),"Investment Commentary")

Related

Return value to a text if all cells are set to FALSE using =Index

i am trying to write a formula which when multiple cells are all "False" the cell will change to "Nothing" else if one of them is "True" it will change to that Cell tab name.
the thing is it worked fine regarding the 2nd part
[
and i used this formula
=INDEX($S$3:$V$3,SUMPRODUCT(MAX(($S$4:$V$4=O16)*(COLUMN($S$4:$V$4))))-COLUMN($S$3)+1)
but the problem is when all are False i get #VALUE!
so i found this code here on Stack
=IF(ISBLANK(<range>),"-",<your code>)
and used it on my Formula as follows
=IF(ISBLANK(W4),"-"=INDEX($S$3:$V$3,SUMPRODUCT(MAX(($S$4:$V$4=O16)*(COLUMN($S$4:$V$4))))-COLUMN($S$3)+1))
but i got False all the times without change
i manged to fix it as Dominique recommended and i added 2 new cloumns one of them which is the old fourmla
=INDEX($S$3:$V$3,SUMPRODUCT(MAX(($S$4:$V$4=O16)*(COLUMN($S$4:$V$4))))-COLUMN($S$3)+1)
the 2nd one is
=IF(W4="Nothing","FALSE","TRUE")
and edited the Status tab to be
=IF(ISNUMBER(SEARCH(X4,O17)),W4,Y4)
and at O17 a text wrriten "FALSE".
so if checked any box the tab name will be wriiten in Status else if none checked it will be wrriten Nothing.
Gif example:
Final
Let me give you a piece of advise: the =OR(...) function turns a bunch of FALSEs into one FALSE, but as soon as you have one TRUE, the result becomes TRUE:

spotfire calculated column using over function

I want to create a calculated column "indicateur" that traces the boolean values
when I have a True, I increment the indicator by 1, however i want the false rows to have the value of the last true indicator.
and when i pass to a new ID, the incrementation starts from zero.
I already tried some spotfire expression using the over function but not getting the right results
case
when [boolean] then sum(If([boolean],1,0)) over (Intersect([ID],AllPrevious([ID])))
else 0
end
You have a couple of issues here. Your case statement is sub setting the data... it will only calculate sums where boolean is true.
The main issue is the over statement though. Something like this should give the correct answer
sum(If([boolean],1,0)) over (Intersect([ID],AllPrevious([Timestamp])))

Excel Multiple If Statements showing False

I have this IF statement:
=IF(AG3<=7,"1",IF(15<=AG3<=21,"2",IF(22<=AG3<=28,"3",IF(29<=AG3<=35,"4",IF(36<=AG3<=42,"5",IF(43<=AG3<=49,"6",IF(50<=AG3<=56,"7")))))))
but either it gives me a 1 or "FALSE"
All the values are within the ranges and should be showing various numbers
Excel does not use 50<=AG3<=56. The way Excel will read this is it will resolve AG3<=56 which will resolve to TRUE or FALSE which have the values of 1 and 0 respectively. And since 50 is greater than both those it will always return FALSE and since you did not specify a final false argument Excel returns FALSE
It needs to be AND(50<=AG3, AG3<=56)
Also "1" returns a number as text and not a true number, remove the quotes.
So:
=IF(AG3<=7,1,IF(AND(15<=AG3,AG3<=21),2,IF(AND(22<=AG3,AG3<=28),3,IF(AND(29<=AG3,AG3<=35),4,IF(AND(36<=AG3,AG3<=42),5,IF(AND(43<=AG3,AG3<=49),6,IF(AND(50<=AG3,AG3<=56),7,"Value not in specs")))))))
But based on your criteria you could use:
=IF(OR(AND(AG3>=8,AG3<=14),AG3>56),"Not to Spec",MATCH(AG3,{-1E+99,15,22,29,36,43,40}))
Don't use Nested IFs if you can avoid it. Instead, use a banded VLOOKUP: it's many times more efficient, and a heck of a lot simpler to troubleshoot. Something like the answer here:
Excel IF statement Not returning the appropriate Value
In your case, here's your lookup list:
Note that since you haven't specified what should happen between 8 and 14 or over 57 I have simply put =NA() in those bands.
And here's the result for a range of numbers:
...and here's the formula that was used in the second column of that second table (using table notation):
=VLOOKUP([#Value],Table3,2,TRUE)

Incorrect If formula

As I'm still getting the hang of excel I'm not 100% sure why this formula isn't working!
=IF(OR(ISBLANK(L6),ISBLANK(M6)),"";IF( L6 >= M2,"True","False")
I'm trying to do a true, false check for cols L and M but as there are blanks in there I need to check for them as well. For the blanks, I just want to make them "".
As per Gowtham's comment, you are missing some brackets.
Use , or ; to delimit parts of the IF statement. Not both.
true and false are special words in Excel. They do not need to have quotes " around them like regular strings.
=IF(OR(ISBLANK(L6),ISBLANK(M6)),"",IF(A1>B1,TRUE,FALSE))
Edit
As per jsheeran's comment this can be simplified further as Excel will automatically evaluate A1>B1 to true or false.
=IF(OR(ISBLANK(L6),ISBLANK(M6)),"",A1>B1)

Excel Nested IF AND

I have the following formula:
=IF(AND(A1=0,A3="","1 item"),
IF(AND(A1=0,A3="Exclude","1 item"),
IF(AND(A1=1,A3="Exclude","1 item","2 items"))))
3 combinations of cell values in A1 and A3 return text which I'm calling "1 item"
Only 1 combination of cells value returns text which I'm calling "2 items".
The only combination to return "2 items" is where A1=1 AND A3="".
The formatting is wrong but I'm not sure where.
Any help would be greatly appreciated.
this is the correct formula -
brackets of AND() were not properly closed.
=IF(AND(A1=0,A3=""),"1 item",IF(AND(A1=0,A3="Exclude"),"1 item",IF(AND(A1=1,A3="Exclude"),"1 item","2 items")))
Excel's IF expects three parameters: Condition, What to do if condition is TRUE, and what to do if condition is FALSE.
I'll re-format your formula so you can see where the error is:
IF( AND(A1=0,A3="","1 item") ,
IF(AND(A1=0,A3="Exclude","1 item"),
IF(AND(A1=1,A3="Exclude","1 item","2 items")
)
)
)
As you can see
For the first IF you are not providing what to do if condition is FALSE,
The same for the second IF,
The third IF has no definition of what to do if the condition is TRUE or FALSE.
Hope this helps you.
UPDATE
Following your comment (which is still not clear to me), hereinafter I'm providing simple rules you may use to construct your formula correctly:
Write your formula as a piece of text (like the example I show above) so that you can easily read, edit and verify it,
Remember that Excel's IF has three parameters: Condition, result when condition is TRUE and result when condition is FALSE,
Within any of these three parameters, you can include whatever you want PROVIDED that the result is compliant with what the function expects for that parameter; for instance, writing for the first parameter 3=8 is completely legal since the result is FALSE (while 4=2*2 would yield TRUE).
Having this in mind, here is the formula I think you are looking for (WARNING!!! I'm not sure I understood what you need, but if not, changing it should be very easy for you now):
IF(AND(A1=1,A3=""),"2 items","1 item")
This is based on your wording: The only combination to return "2 items" is where A1=1 AND A3="".

Resources