excel nested if formula - excel

I am working on an excel file, and i am trying to use a nested if formula to achieve what i would like.
i have two columns:
A B
condition is this:
if the value in a2=a3, then check if the minus of b2 and b3 is certain value, and if it is, put a yes, else put a no. this will iterate till the end of the excel file.
so far here is what i have. not sure how to use the excel formulas. any help is much appreciated.
if(a2=a3,b2-b3=5 or b2-b3=-5 or b2-b3=20 or b2-b3=-20, "yes", "no")

This works:
=IF(A2=A3,IF(OR(B2-B3=5,B2-B3=-5,B2-B3=20,B2-B3=-20),"yes","no"),"no")

Possibly use ABS function here..
=IF(AND(A2=A3,OR(ABS(B2-B3)={5,20})),"yes","no")

Related

Check for specific formula (no VBA)

Is it possible to check if cell formula is a specific formula, and not just "isformula" ?
My example:
In cell A1 I have, normally, "=B2".
But during the use of this sheet the formula might be overwritten to "=D4".
How can I get a simple TRUE result if the formula in cell A1 is "=D4", and FALSE if it's something else ?
I get fix it with VBA but I prefer to use standard formulas first (if it's possible obviously).
Thanks for your time.
Using FORMULATEXT:
=FORMULATEXT(A1)="=D4"

Making a formula in excel

So I never worked with excel, but I would like to know if it is possible to do the following:
I want to put in a cell , an equation (e,g 2x^3-x), and I would want to make another cell use that formula, but replacing the 'x' with the value from said cell. In other words, creating a template of an equation, to be used in diferrent cells!
How can I do this ? Is it even possible?
Sorry if I'm asking something stupid!
Thanks in advance!
You can replace the x in your formula with a range reference: 2*A1^3-A1
You can create a named range and name it x then use 2*x^3-x

Using “<>” logic in an Excel Sumifs formula.

I apologize in advance if my question is unclear. It’s my first time posting on this forum. I’m trying to write a Sumifs formula in Excel where one of the criteria is to sum everything except a specific value. I write a small amount in SQL and i use the <> function to eliminate specific values. Is there a similar ability in Excel? Thank you for your help!
With SUMIF() or SUMIFS(), you can use <>:
=SUMIFS($A$1:$A$100,$B$1:$B$100,"<>123")
That will check if a value in your B1:B100 range is 123, and if so, will not use that equivalent value in the A1:A100 range.
Microsoft Excel has a NOT function.
So, you would say
=NOT(A2="yourtest")
In this case, it means it returns true if A2 is not the string "your test"
I think that maybe your syntax for the criteria is not correct.
This formula works to exclude the string "A" from the summed results...
=SUMIF($A$1:$A$6,"<>A",$B$1:$B$6)
If you are trying to exclude "A" by referencing a cell that "A" is stored, this will not work. For example
=SUMIF($A$1:$A$6,"<>E1",$B$1:$B$6)
Here is a working example in excel:

How to extract a value from a cell if certain criteria is met? (Diagram included) (Excel)

I would like a function that is able to do this. I've been busting my head with the Index and Match functions but I can't get them to work! Any help is aprecciated. Thanks =')
I think you want to sum all values from column A where column C is equal to TMP. You want to use the SUMIF function.
=SUMIF(C2:C4,"TMP",A2:A4)
The Excel macro to do this is trivial, so I must not be understanding the question.
If I put the following equation in D1...
=IF(C1=C3,A1+A3,)
The contents of D1 = 600 when the contents of C1 and C3 are equivalent.
I think you need more clarity in your question. What is "C"? Do you want an Excel macro or VBA? What is the significance of the values in line 2...they seem superfluous.

How to SUMPRODUCT cells that contain formulas

So, what I need is to show SUMPRODUCT of two cell ranges? Both of these cell ranges, that is, each cell contains formula in it. From this formulas I get some number in the cells. This is the way I'm doing it right now:
=SUMPRODUCT((S7:S1000)*(T7:T1000))
and because of formulas I get error A value used in the formula if of the wrong data type
How could I solve this problem? Is there some kind of way to read just number in the cell and not the formula?
Thanks
Replace the "*" with a comma (",").
I've had so much problems with this and in the end it was that instead of comma(",") I needed to use semicolon(";"). Maybe its up to Excel version, I'm using 2010?! So, solution was:
=SUMPRODUCT(S7:S1000;T7:T1000)

Resources