This might be a simple fix I'm unsure. I have the following formula which I would like to be able to drag up and down =IF(C311>B311,IF(C310>B310,IF(B309>C309,IF(C312>B312,2,1),0),0),0)
I'm guessing AND can be implemented in some way but I'm not sure. The logic behind my goal is if C311>B311 AND C310>B310 AND B309>C309 then check to see if C312>B312 if it is then put a 2 else put a 1. Perhaps there is another solution as well I'm not thinking of.
Try this: =IF(AND(C311>B311,C310>B310,B309>C309),IF(C312>B312,2,1),"")
Last argument I left it as "" but replace it to whatever you need.
Just another approach-
=IF((C311>B311)*(C310>B310)*(B309>C309),IF(C312>B312,2,1),"")
Related
What I need is something like
=COUNTIFS(A2:A9,">=1",A2:A9,"<=3").
I know this works just fine but I wonder if I can make it shorter.
I'm looking for something like
=COUNTIFS(A2:A9,{">=1","<=3"}).
But turns out the { } combines ">=1" and "<=3" with an OR function. What I want is to put the two cretiria within AND. What should I do?
Maybe that's what you mean.It's not shorter
=SUM(COUNTIFS(A2:A9,">"&{0,3})*{1,-1})
I am trying to build an IF formula but I am getting an error that I have too many arguments. Any idea how to fix this?
=IF(BZ190=$C$163,$C$163, IF(BZ190=$C$163*$C$165,$C$163*$C$166, IF(BZ190=$C$163*$C$166,$C$163*$C$167, IF(BZ190=$C$163*$C$167,Z190=$C$163*$C$168, IF(BZ190=$C$163*$C$168,$C$163*$C$169, IF(BZ190=$C$163*$C$169,$C$163*$C$170, IF(BZ190=$C$163*$C$170,$C$163*$C$171, IF(BZ190=$C$163*$C$171,$C$163*$C$172, IF(BZ190=$C$163*$C$172,$C$163*$C$173, IF(BZ190=$C$163*$C$173,$C$163*$C$174, IF(BZ190=$C$163*$C$174,$C$163*$C$175, IF(BZ190=$C$163*$C$175,$C$163), IF(AND((SUM(BZ190:BZ$190)-CA$168)<0,BZ190=""),$C$163*$C$165,"")))))))))))
The last but one if-clause looks like this:
IF(BZ190=$C$163*$C$175,$C$163),
^
|
| bracket is obsolete
There should not be a bracket at the end, it should just be:
IF(BZ190=$C$163*$C$175,$C$163,
But I have another point here: imagine that, within half a year or within a year, you need to modify something. How will you find out what all those things mean? Therefore I'd advise you to use names, something like:
$C$163 equals "interest_rate"
$C$165 equals "student_income"
...
Like this, your formula will become something like:
IF(BZ190=interest_rate,interest_rate,
IF(BZ190=interest_rate * student_income, ...
This will be much clearer to read and to maintain. And, oh, before I forget: writing the formula in multiline (one if-clause per line) also increases readability and maintainability.
I have a set of data that is generated:
=((E31/320)^2)/(2+(E31/380))
=((E32/320)^2)/(2+(E32/380))
=((E33/320)^2)/(2+(E33/380))
...
I want to create a sum of these, but I don't want to just SUM them together; I want to write a function that put these together. I came up with this row:
=SUMPRODUCT(((ROW(E1:INDEX(E31:E63;C34)))/320)^2/(2 + (E31:E63/380)))
The problem with this line is it seems to overdo the whole thing. I need to somehow use one variable for the both E31:E63 intervals, because it will otherwise loop through the second E31:E63 n-times, instead of using the same value.
As I see it, there are two solutions.
Write the data in columns, but using the first solution
Write the function, but try to find something that makes the two E31:E63 work as one variable.
I want to implement the second option.
I believe
=SUMPRODUCT(((E31:E63/320)^2)/(2+(E31:E63/380)))
Will do what you want.
Here is my statement with just one IF Statement:
=IF(AF2="Consultant",IF(C2=INDEX(JIRA!F:F,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0),"N/A")
This works great, but now I need to add two more IF Statements.
AF2 will either contain "Consultant", "Retailer", or "PC".
Each one will be directed to a different price column:
for "Consultant" it's JIRA!F:F
for "Retailer" it's JIRA!D:D
for "PC", it's JIRA!E:E.
I've been wracking my brain for two days now and haven't gotten no where.
Suggestions?
Thank you in advance!
Use CHOOSE()
=IFERROR(--(C2=INDEX(CHOOSE(MATCH(AF2,{"Consultant", "Retailer", "PC"},0),JIRA!F:F,JIRA!D:D,JIRA!E:E),MATCH('RFO Checks'!M2,JIRA!A:A,0))),"N/A")
Aaron,
I have provided you the high level structure for the change of logic.
If this is what you want, then you can substitute the phrases with the appropriate logic.
=IF(AF2="Consultant",
IF(C2=INDEX(JIRA!F:F,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0),
IF(AF2="Retailer",
<insert_logic_for_retailer>,
IF(AF2="PC",<insert_logic_for_PC>,"N/A")
)
)
Logic for Consultant -
IF(C2=INDEX(JIRA!F:F,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0)
Logic for Retailer, use this to replace -
IF(C2=INDEX(JIRA!D:D,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0)
Logic for PC, use this to replace -
IF(C2=INDEX(JIRA!E:E,MATCH('RFO Checks'!M2,JIRA!A:A,0)),1,0)
Let me know in case you still have any issues!
I have a probleem in excel and i didnt figure it out how to do it right. anyway i'll give you an example to explain it correctly.
Name Surname Code
Martin Kara Maar4 (=> First two letters from Martin and 2nd en 3rd letters from surname and code is 4 and that's the lenght of the surname.
the probleem is i wanted to see the Maar4 as Maar04 not as Maar4.
I have already checked the formatcell but still didnt find it.
this is the code i wrote it:
=UPPER(LEFT(A2;2)& MID(B2;2;2)&LEN(B2))
thank you
edit: problem is solved. you guys are amazing. thank you
I'm not sure why you're using UPPER() if you expect Maar04. If you do want to get Marr04, you would use:
=LEFT(A2;2)&MID(B2;2;2)&TEXT(LEN(B2);"00")
If you want to get MAAR04, then you'd use the uppercase:
=UPPER(LEFT(A2;2)&MID(B2;2;2)&TEXT(LEN(B2);"00"))
Try using TEXT function to force 2 digits
=UPPER(LEFT(A2;2)& MID(B2;2;2))&TEXT(LEN(B2);"00")
If you're quite sure the length will never go above 99 you can try this hack:
=UPPER(LEFT(A2;2)& MID(B2;2;2)&RIGHT(LEN(B2)+100,2))
Need to use REPT() to achieve this.
See: http://office.microsoft.com/en-us/excel-help/rept-HP005209236.aspx
Your formula MIGHT look somehing like this;
=UPPER(LEFT(A2;2)& MID(B2;2;2)&REPT(0,LEN(B2)))