Excel If and else statement - excel

Hi All,
Can somebody please help me with if and else in excel.
My codes seems correct when doing it separately, but when combining them - it does not work.
Codes are as follow:
=IFS(E7=Sheet2!$B$4,Sheet2!$C$4,IF(E7=Sheet2!B5,Sheet2!$C$5,"10"),IF(E7=Sheet2!$B$11,Sheet2!$C$11,IF(E7=Sheet2!B12,Sheet2!C12,Sheet2!C13)))
the last option still give me #value error.
have the sheet 2 that includes:
Merit Score
Low 2
Medium 5
High 10
Error Score
Low -2
Medium -4
High -10

Your formula seems not to take the value of D7 into consideration. Therefore I wonder whether it should. My formula below takes a different approach. I think it's easier to manage than IFS. Please try it.
=INDEX(IF($D$7="Merit",{2,5,10},{-2,-4,-10}),MATCH($E$7,{"Low","Medium","High"},0))

The begining of the code is wrong. See if this works.
Wrong
=IFS(IFE7=Sheet2!$
Right
=IFS(E7=Sheet2!$
Regards

Related

Using IF with ROUNDDOWN, To Calculate How Many Times For A Process

I apologize if the title is a bit vague. I am trying to create a calculator that takes into account how much "scrap" I have, how much is needed to resmelt it, and how many bars recieved.
Currently using:
(=if((amtOwned/qtyToSmelt)<1,,rounddown((amtOwned/qtyToSmelt)*barsMade))
Table and Formula
The problem I am having is you MUST have the QTY to Smelt. But the value returned includes partial quantities.
Ex. 125 Bottle Caps should equal 4 Bars total. Yet it returns 5.
How can i make the formula only account for increments of the bars recieved?
Thank you for any help, again i apologize if this isn't that clear. Im not exactly sure how to express my need in this situation.
I have tried messing around with the syntax and where every argument sits, even this formula is the most recent iteration of what i thought would be needed.
EDIT: I have tried using the TRUNC function and this seems to be working as I need it to. The formula now is:
=TRUNC((AMTowned/AMTneeded),0)*barsRecieved
=TRUNC((136/50),0)*2 This is returning 2 bars instead of 3. Which is exactly what I need.
It appears this is working by truncating the number first then multiplying it. So, 1.5 becomes 1 before being multiplied. This was my guess after doing more research. I had been searching for a while before I posted this but am glad to have learned what I have in searching for this.
There is a tool for auditing formulas. To see it go to Formulas > Evaluate Formula.
So here is you formula =IF((E3/C3)<1,,ROUNDDOWN((E3/C3)*D3,0))
Have you tried the calculation on your regular calculator? To me it is doing what you would expect. (125/50)*2 = 5

Excel grade formula

I am currently doing a formula to find the overall grade for a student that has done 2 exams and 1 assignment.
I have made a formula that can achieve the task, but i have ran into a problem and I dont exactly understand why its giving me the incorrect answer.
As you can see in the screen shot provided you can see the 2 exams and 1 assignment, the grades are, A, A+, B+ which averaged should come out to a a value of 13.66 and as a grade as A (rounded upwards) but when i click out of the cell it shows a C+ and I dont understand why.
=INDEX(L$2:L$16,MATCH(SUMPRODUCT((E8:G8=L$2:L$16)*(M$2:M$16))/COUNTA(E8:G8), M$2:M$16,-1))
The quickest solution since you specified that its only for three scores, is to use the average of three separate lookups, something like:
=AVERAGE(VLOOKUP(E6,gradevalues,2,FALSE),VLOOKUP(F6,gradevalues,2,FALSE),VLOOKUP(G6,gradevalues,2,FALSE))
...where gradevalues is a named range representing the list of lettergrades-to-scores.
eg.,
Your original formula is exactly right.
After hand typing everything in from your example, it works flawlessly.

I'm trying to use a formula to calculate a percentage based on hours completed/ items done compared to hours estimated/ items total

As the title says, I'm trying to calculate a percentage that represents productivity. I have a formula that almost works to change the colors (conditional formatting) but it seems to work in reverse. I can't figure out how to make it work and I'm hoping its something simple and I'm just dense after working on it for a day.
Below is my formula that I have so far.
=VALUE(LEFT(E18,LEN(E18)-3))*(J18/K18)/D18>95%
As I said, I hope that it's stupid simple to make it work and I'm just being stupid.
This is the cells in question in the event the clarification of seeing it will make more sense:
Links to pages I hoped would help:
1st: Not quiet right.
2nd: VBA so not it either.
3rd: Again just not something I can pull enough from.
With some outside help, I was able to get this working. Below is the code that works for my setup with conditional formatting.
=(D18/VALUE(LEFT(E18,LEN(E18)-3)))/(F18/G18)>0.95
=(D18/VALUE(LEFT(E18,LEN(E18)-3)))/(F18/G18)>=0.9
=(D18/VALUE(LEFT(E18,LEN(E18)-3)))/(F18/G18)<0.9

Trying to get the number of entries between certain dates

In regards to the screen shots below, I am trying to make a formula that will give me the number of times QLD appears per month's data.
Raw Data
Table Data
The second screenshot gives what I thought would work. But it just comes back with 0 instead of 4. Here's the code if people find this to work with.
=SUMPRODUCT(--(Sheet1!C2:C500<=Sheet1!O2),--(Sheet1!C2:C500>=Sheet1!N2),--(Sheet1!B2:B500="QLD"))
What am I doing wrong? I have been Googling like mad but I can't quite make it work.
Also, if anyone has a hint for me to be able to total the value of QLD entries per month that would also be appreciated. (i.e. January QLD total value would be $1,275,000)
Thanks in advance! Please let me know if anything needs clarifying.

Finding the absolute difference with positive and negative values

I have two columns. One with positive values and one with negative values. I need to find the absolute difference between the two columns.
What I am currently doing is the following: First of all, I edit both the columns to make all the values positive. Then I subtract the first column with the second column. I change any negative value to the positive one. Is this the same as the absolute difference?
Why not just use the ABS function
=ABS(B1-A1)
It sounds like what you're doing is actually
=ABS(ABS(B1)-ABS(A1))
which is not the same as
=ABS(B1-A1)
for example if you have -3 and 1 the first would give you 2 and the second would give 4. I don't know which one you want.
This works no matter which value is positive or negative:
=MAX(A1,B1) - MIN(A1,B1)
OK, so here's a pretty clunky workaround, but it is something where I can understand what's going on and works every time.
Here is my scenario where I needed to solve this problem. I had a system stock list showing 1 of these 10 of those but also showing -10 of these and 5 of those, and once entering my physical data from doing a stock take, I had pluses and minuses all over the place, so the data looked like this:
Physical stocktake value system value
0 0
1 0
1 2
0 -1
1 -1
Effectively all the different connotations of pluses and minuses.
so column 'a' is actual, column b is system
I created columns c,d,e,f ..... I warned you it was a little clunky, but it is sound in the result.
formula in column c = '=IF(A1>B1,A1+B1,A1-B1'
formula in column D = '=IF(B1+C1<>A1,A1-B1,C1)'
formula in column E = '=IF(D1>C1,C1,D1)'
Column E is the data you want, it rationalises all of the pluses and Minuses in your data to show a true difference (independent of positive and negative location) for the values you require.
Someone much cleverer than I will condense this down into a singular equation, but i read up on it, tried the current solutions/advise, and didn't have a clue what the techs were going on about, so came up with this faultless solution.
It does work and it s simply a transpose the A1's and B1's for your data content.
Hope it helps (a little).
I for one will check back, just to pick up on what the clever guys and gals come back with, just a case of life is to short to drive into this level of detail for a simple solution. Sometimes simple is best.
Yeah ok, set myself up for that one ..... so I'm simple, but I know what I'm doing and understand it ........

Resources