Multiple What IF Statement in Excel for Soccer score project - excel

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","")))

Related

Linking two excel datasheet together using python

I am trying to link two excel datasheet together. So that if a cell from the first datasheet is clicked, it opens data regarding the value of that cell from a second datasheet. Here is an example for further clarification.
This is my first datasheet
0 2011 A1 SS FF
1 2100 A5 SS FF
2 2245 A3 RR 22
3 2945 A4 AA 3E
4 1140 A7 WE 7F
Now if I click A1 it should somehow provide me the data from the second datasheet, which should be NaN value and if i click A2 it should give me New York
A1
A2 New York
A3 Newfoundland
A4 Ontario
A5 Texas
A6 Nova Scotia
I apologize for not being able to provide the original data frame, due to non-disclosure reason. Any help would be greatly appreciated.
Thank you
You can link cells in other worksheets or workbook with XlsxWriter using the write_url() method with the internal: or external: uri. See the XlsxWriter docs.
This means that you will probably need to handle transferring the data outside of Pandas or else use Pandas and then overwrite the cells that you want to add links to using XlsxWriter.

Matching cell from two values

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))

Excel formula checking multiple conditions

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.

excel exclude a certain value from mode average

I'm looking for a formula that can find the Mode Average from a range of cells but exclude the value 14 from the range
example
A1 =26
A2 =14
A3 =14
A4 =14
A5 =26
A6 =3
A7 =16
A8 =16
A9 =26
Result would be:26 and not 14
Array formulas to the rescue:
=MODE(IF(A1:A6 <> 14,A1:A6))
Enter it via Ctrl + Shft + Enter
Not very elegant, but it works:
=(SUM(C3:C11)-COUNTIF(C3:C11,14)*14)/(COUNT(C3:C11)-COUNTIF(C3:C11,14))
c3:c11 is the range I am looking at on my test sheet.
I am basically looking for the sum of all values in the considered range, subtract 14 times the occurence of the number 14 from this sum and then divide the result by the total number of cells minus the occurences of 14 again. The whole thing will look much nicer, if you have the luxury of another cell that could serve as the "14-counter".
Edit: I overlooked the word "mode" in the question. This answer will only compute the average ...

How do I link the content of a cell to another worksheet as opposed to the value?

I realize my title doesn't really explain what I'm asking as I don't know the correct terminology but bear with me and I'll explain my question.
I know how to link two cells so that if one changes, the other does as well (i.e. cell C3 is linked to cell E5 by selecting cell C3 and entering "=E5"). But how do I link the information in the cell to another cell?
If my worksheet looks like this:
cell B1 - Grapes, cell C1 - 50
cell B2 - Apples, cell C2 - 60
and I link cell F1 to cell C2 with "=C2". If I change the order of cell B1 and cell B2 to become alphabetical then cell F1 is no longer linked to the value in cell C2 (50) but changes to the value that now becomes cell C2 (60). How do I link cell F1 to the actual value (50) in cell C2 even if the order changes.
Help... Thank you!
Not sure if this is an efficient method; if i correctly understood your question then you can use = to link two cells For example:
Sheet one can look like this
A B C D E
1 1 2 3 4 5
2 5 4 3 2 1
3 1 2 3 4 5
Total 7 8 9 10 11
Sheet two requires cell links so you do:
TotalForA =Sheet1!A4 //output will be 7
TotalForB =Sheet1!B4 //output will be 8
.
.
.
In a simple word you can use = sign and click on whatever cell you're like to get.

Resources