I am creating a grading sheet for my students in excel, but I am stuck on a complex formula. I am trying to create a formula that will do this:
If(Cells A1 AND B1 AND C1 >= 24)AND(Cells D1 AND E1 AND F1 AND G1 AND H1 >=120 and <174)
Then Print "Level 2 PP"
Else IF (Cells A1 AND B1 AND C1 >= 24)AND(Cells D1 AND E1 AND F1 AND G1 AND H1 >=150 and <204)
Then Print "Level 2 MP"
Else If(Cells A1 AND B1 AND C1 < 24)AND(Cells D1 AND E1 AND F1 AND G1 AND H1 >=120 and <174)
Then Print "Level 1 Pass"
I hope this gives an idea of what I am trying to achieve. It's very hard to understand as the students have to achieve a certain amount of points in certain units to achieve certain grades. Any help will be greatly appreciated.
Generally, the way to do what you want to accomplish is with Nested If statements.
Before getting to that, the conditions you list in your question could be constructed like this:
IF(AND(MIN(A1:C1)>=24,MIN(D1:H1)>=120,MAX(D1:H1)<174),"Level 2 PP",
"Not Level 2 PP")
IF(AND(MIN(A1:C1)>=24,MIN(D1:H1)>=150,MAX(D1:H1)<204),"Level 2
MP","Not Level 2 MP")
IF(AND(MIN(A1:C1)<24,MIN(D1:H1)>=120,MAX(D1:H1)<174),"Level 1
Pass","Not Level 1 Pass")
Putting these together, I get:
=IF(AND(MIN(A1:C1)>=24,MIN(D1:H1)>=150,MAX(D1:H1)<204),"Level 2
MP",IF(AND(MIN(A1:C1)>=24,MIN(D1:H1)>=120,MAX(D1:H1)<174),"Level 2
PP",IF(AND(MIN(A1:C1)<24,MIN(D1:H1)>=120,MAX(D1:H1)<174),"Level 1
Pass","Other")))
The criteria for "Level 2 MP" overlaps with "Level 2 PP." I made the "Level 2 MP" the "outside of the nest," so, in the case of overlap, student will be identified as Level 2 MP.
I strongly suspect the categories you are interested in aren't exactly as you described them. For one thing, as noted above, they overlap. And, assuming a bigger number is better, does a student really not "Level 1 pass" if one of A1, B1 or C1 are > 24?
If there are more categories, or if the criteria are more complicated, I'd consider using separate columns to do some of the intermediate calculations. Hope this helps.
Related
if I have a state 48456 among others where 11111 to nnnnnn states exist, how can I split the (or any number of) state in excel from its one cell into 5 new cells containing in order the results of the state in question eg
A1 B1 C1 D1 E1 F1
48586 into 4 8 4 5 6
Thank you.
PS I have a lot of states to split into separate cells.
Put:
=--MID($A1,COLUMN(A:A),1)
in B1 and copy over and down the list.
need help here :) I am not excel expert
I have a simple spread sheet with some data and I need to find the matching values from another sheet. Some help would be appreciated.
The data looks like this:
d1 d2 d3 d4 d5
c1 1 5 4 4 3
c2 2 4 9 1 2
c3 4 4 7 8 4
c4 4 7 1 9 2
c5 4 4 7 6 8
So above c1, c2 etc. means Code's and d1, d2 etc. means Dates (future dates).
The numbers between I need to catch in a different spread sheet
example
Code: c2 - User provides the code
Date: d4 - User provides the date
Value: 1 - this value I need to get with formula
Should I attach example file if needed?
If possible to use performance wise formulas as might be quite few of them. Perhaps INDEX/MATCH? if I know how to use it :) but I think also INDEX/MATCH will slow it down a lot, I might be wrong also :)
thank you for your help in advance.
EDIT:
Added screenshot, might help also what is needed.
Assumptions / prerequisites:
Sheet1 cells (A1:F6) is your data / headers from your example
Sheet2 cell B3 is where the user types the code
Sheet2 cell B4 is where they type the date
Sheet2 cell B5 is where the value displays
this would be your formula in Sheet2 C5
=INDEX(Sheet1!A:F,MATCH(B3,Sheet1!$A:$A,0),MATCH(B4,Sheet1!1:1,0))
I have a long list of soccer data but in it's most simplistic form it looks like this:
A1 Barcelona
A2 Madrid
A3 2
A4 1
A5 (this will be the IF Statement)
There are over 200 rows but all with the same premice, so what I want is an if statement that says if the score in A3 is larger than A4 then A5 has a W and if A4 is a larger score than A3 than A5 has an L
Can someone give me some pointers as to how to do this, only need to know it for the top line of the data and then I can replicate throughout
Thanks
Dan
Try this if statement:
=IF(A3>A4,"W",IF(A4>A3,"L",IF(A3=A4,"Tie","")))
I need advice/help. I am working on calculation in excel where I have data like mentioned below.
. A B C D E F G H
1| A275 A277 A273 A777 A777 TOTAL A222 GRAND TOTAL
2| 5 7 4 3 4 7 7
Now, I want to count row 2 based on the header.
Here is the condition.
If A1 <> B1 then take A1, if B1 <> C1 then take B1, if C1 <> D1 then C1, so on.
But tricky part is...
If D1<>E1 then D1 else (if E1<>F1 then E1 else (if F1 = "TOTAL" then F1 else(if F1<>G1 then F1)))
In short H2 should have 30 and not 37.
Added comments:------------------------------------
So, Basically if A1<>B1 then take A1 but if A1=B1 then take B1, but then for B1, its a same rule like if B1<>C1 then take B1, but if B1=C1 then take C1 and for C1, same rule. Stopping point will be "TOTAL". Along with these logic I need to check if any cell in row 1 is "TOTAL" then take value for same column. Now this "TOTAL" can be in any cell in row 1.
So from above table my calculation will be 5(A2) + 7(B2) + 4(C2) + 7(F2) + 7(G2) = 30
In this calculation I have not included D2 and E2 as D2=E2 so I took D2, here E2<>F2 so I should have taken E2, but as F2="TOTAL" so I took F2 and not D2 and E2.
I hope this make sense. (Sorry, I know its confusing.)
I have data in more then 100 columns.
Can this be achieved using Macro?
------------------------------------------------------------
Another pain point is data and header are dynamic, so I can't have a fix format. Logic should be in a way that can handle the dynamic data and header.
Any help or suggestion will be greatly appreciated.
I achieved the results you want with this.
Add a helper row. In cell A3 write this formula and drag it to the right:
=IF(OR(A$1=B$1,B$1="TOTAL"),0,1)
Calculate sum in say cell H4 (not H2 because if the formula refers to entire row 2 there will be circular reference):
=SUMIF($3:$3,1,$2:$2)
Suppose we have following data
prices
leptop 30
pc 29
table 10
house 15
car 25
train 32
pen 45
dog 33
cat 17
TV 8
I have calculated average of these prices avg==AVERAGE(D3:D12) where D3:D12 are price columns. Now I want to choose these items or list items which has price less than average for example, I know there is function if, but how can I use it together to list all data, which satisfies the if condition?
Are you trying to list the prices that are less than the average all in the same cell?
If you're just trying to indicate whether they are or not next to the column, you could use: =IF(D3 < AVERAGE($D$3:$D$12), "Less Than", "Greater or Equal")
Edit:
http://i.imgur.com/SRTfvJe.png
Ok, to get the result you want (see image) then you need to use the following formulas (this assumes these formulas are in column F).
The first row in the column should be: =IF(B3 < AVERAGE($B$3:$B$6), A3, "") where B3 is the data and A3 is the name.
And all the other rows should be: =IF(B4 < AVERAGE($B$3:$B$6), IF(F3="", A4, F3 & ", " & A4), F3) where B4 is the data and A4 is the name.
This is how you could do with with Advanced Filter. Set-up your excel sheet as follows, and enter the formulas appropriately:
Then, go to Advanced Filter:
You will get:
In E3 and copied down:
=IF(D3<AVERAGE(D$3:D$12),C3,"")
will give a list (admittedly with spaces) if the names are in ColumnC. (Guessing that 'continue' does not mean the same cell.)
Does a filter work for your needs? If I go to the "data" tab in Excel 2010, highlight the data, and click "Filter", I can filter on items "below average" in the price column.