locating the value on a table and interpret it (IF,INDEX,MATCH) - excel-formula

I wanted to find the location of a value on the 2 table.
I have these 2 tables:
HEIGHT FOR BOYS and HEIGHT FOR GIRLS
It's about the proportion of height to age (with an interpretation of severely stunted "SS", stunted "S", Normal "N", and Tall "T")
For example:
BOY #1
Age : 140
Height : 156.5
I should get "N" as a result, by looking up on the table HEIGHT FOR BOYS since the data given is for BOY.
Please check the attached photo, I also have the example there... I just don't know how to get the correct formula for this
LOCATE VALUES

Related

Calculation from the merged cells

From the table below, I wanted to calculate the average percentage of training. If the status starts with "3" show as 100, "2" show as 50, and "3" show as 0 and then calculate the average. The summary table doesn't include the subjects which are blank (highlighted in grey)
I am able to get the status calculation using the formula "=LET(_classes,FILTER('Content Tracker'!A3:A1048576,'Content Tracker'!A3:A1048576<>""),
_subjects,FILTER('Content Tracker'!B3:B1048576,'Content Tracker'!B3:B1048576<>""),
_trainings,FILTER('Content Tracker'!E3:G1048576,'Content Tracker'!B3:B1048576<>""),
_merge,HSTACK(SCAN(_subjects,_subjects,LAMBDA(x,y,IF(y="",x,y))),_trainings),
_uclasses,UNIQUE(INDEX(_merge,,1)),
_trainingonecomp,MAP(_uclasses,LAMBDA(x,SUM(--(x=INDEX(_merge,,1))*(INDEX(_merge,,2)<>0)IF(ISNUMBER(SEARCH("3",INDEX(_merge,,2))),100,IF(ISNUMBER(SEARCH("2",INDEX(_merge,,2))),50,0))))),
_trainingtwocomp,MAP(_uclasses,LAMBDA(x,SUM(--(x=INDEX(_merge,,1))(INDEX(_merge,,3)<>0)IF(ISNUMBER(SEARCH("3",INDEX(_merge,,3))),100,IF(ISNUMBER(SEARCH("2",INDEX(_merge,,3))),50,0))))),
_trainingthreecomp,MAP(_uclasses,LAMBDA(x,SUM(--(x=INDEX(_merge,,1))(INDEX(_merge,,4)<>0)*IF(ISNUMBER(SEARCH("3",INDEX(_merge,,4))),100,IF(ISNUMBER(SEARCH("2",INDEX(_merge,,2))),50,0))))),
_avg,AVERAGE(_trainingonecomp,_trainingtwocomp,_trainingthreecomp),
_output,VSTACK(HSTACK("classes","subjects","Training 1 Completed","Training 2 Completed","Training 3 Completed","Average"),HSTACK(_classes,_subjects,_trainingonecomp,_trainingtwocomp,_trainingthreecomp,_avg)),
_output)"
This is the output I got:
I am not able to remove the subjects (highlighted in yellow) with blank values in the source files, and the class and average columns throw some errors.
This is the result expected:
Can anyone assist me with this to achieve the expected result?

How Do I Perform a Binary Search Within a Nested List?

The question is:
In a class, the physical education teacher recorded the height of the students.
For a sports meet, he has to create a list of the students according to the heights in ascending order. Then he needs to find the
person of a height greater or equal to 58 inches to select for a particular sport.
Note: Use Selection sort to sort the students and Binary search to search the students in that list.
Write the PAC, algorithm, and python code to implement the same.
INPUT:
Enter the number of students N
For each N student
Enter the regno.
Enter the height.
OUTPUT:
List of students’ Reg numbers (sorted in order of height)
Register no of the students having height greater than or equal to 58 inches / NOT FOUND
What I did so far:
D=[]
n = int(input("enter number of students:"))
for i in range(0, n):
regno=input('enter registration number: ')
height=int(input('enter hieght of student: '))
D.append(['regno' , regno, 'height' , height])
D.sort(key=lambda x: x[3])
Now what?
According to me the question is not quite right , because it is asking to perform a binary sort to find heights above or equal to 58 . A binary sort will only work if a person with a height of 58 inches is present , cuz in that case we can precisely get the index of element that contains the height 58 . But if the height 58 is not present i.e. if people with height 59,60,61... are present , binary search will not work.
Here is my solution building on your approach:
D=[]
n = int(input("enter number of students:"))
# entering the required data to the lists
for i in range(0, n):
regno=input('enter registration number: ')
height=int(input('enter height of student: '))
D.append(['Regno:',regno,'Height:', height])
# performing selection sort (in ascending order)
for step in range(len(D)):
min_id = step
for i in range(step + 1, len(D)):
if D[i][3] < D[min_id][3]:
min_id = i
(D[step], D[min_id]) = (D[min_id], D[step])
#comparing the heights of the students to find the index of the student whose height is nearest to 58 .
for i in range(len(D)):
if D[i][3]<58:
continue
elif D[i][3] >=58:
index=i
break
# once we get the index of the student whose height is the nearest to 58 , we use list slicing to display the records starting from that index.
print("The list of students whose height greater than or equal to 58 inches:")
print(D[index:])

Nesting Excel Score

For a project we are making an Excel file for the WK in Russia.
So I need the following things (if its possible only nesting):
TOTO: the home team wins = 1, away team wins = 2, its equal = 3
This is what I have right now for these:
IF(F5<H5;"2";IF(F5>H5;"1";IF(F5;"3";IF(H5;"3";""))))
This works but if I set the score 0-0 then I get 0 back in stead of 3.
Then the next one:
If they gambled that the home team score is correct they get 2 points,
If they gambled that the away team score is correct they get 2 points
If they gambled that the TOTO is correct: 5 points
If all is correct: 1 bonus point
What i mean with the second thing is if somebody says that the score is 2-1 and the game ends on 0-1 then i get 2 points (one for the TOTO and 1 point for the team that scored 0-1).
E.g. Belgium-Tunis (player1) on 2-1 with TOTO = 1. Game ends on 0-1. Player1 gets 2 points in total because he predict the goals of Tunis correct.
Last but not least:
IF the teams are going to the quarter finals,... are coming a few lines on it:
Country good: 10 points
European champ correct: 25 points
Total yellow: 20 points
TOtal red: 20 points.
I believe the formula you want for the first of your questions (the home team wins = 1, away team wins = 2, its equal = 3) is:
=IF(F5<H5,"2",IF(F5>H5,"1",IF(F5=H5,"3","")))
Not sure why you have the numbers in speech marks (have left as is in the above) you could have:
=IF(F5<H5,2,IF(F5>H5,1,IF(F5=H5,3,"")))
Which would probably be easier if you want to do any maths with the values.
It's not entirely clear what you're asking with the rest of the question(s).

Excel IF OR Statement

I am having trouble determining the correct way to calculate a final rank order for four categories. Each of the four metrics make up a higher group. A Top 10 of each category is applied to the respective product to risk analysis.
CURRENT LOGIC - Assignment of 25% max per category.
Columns - Y4
Parts
0.25
25
=IF(L9=1,$Y$4,IF(L9=2,$Y$4*0.9, IF(L9=3,$Y$4*0.8, IF(L9=4,$Y$4*0.7, IF(L9=5,$Y$4*0.6, IF(L9=6,$Y$4*0.5, IF(L9=7,$Y$4*0.4, IF(L9=8,$Y$4*0.3, IF(L9=9,$Y$4*0.2, IF(L9=10,$Y$4*0.1,0))))))))))
DESIRED...
I would like to use a statement to determine three criteria in order to apply a score (1=100, 2=90, 3=80, etc..).
SUM the rank positions of each of the four categories-apply product rank ascending (not including NULL since it's not in the Top 10)
IF a product is identified in more than one metric-apply a significant contribution weight of (*.75),
IF a product has the number 1 rank in any of the four metrics-apply a score of (100).
Data - UPDATED EXAMPLE
(Product) Parts Labor Overhead External Final Score
"XYZ" 3 1 7 7 100
"ABC" NULL 6 NULL 2 100
"LMN" 4 NULL NULL NULL 70
This is way beyond my capability. ANY assistance is appreciated greatly!!!
Jim
I figured this is a good start and I can alter the weight as needed to reflect the reality of the situation.
=AVERAGE(G28:I28)+SUM(G28:I28)*0.25
However, I couldn't figure out how to put a cap on the score of no more than 100 points.
I am still unclear of what exactly you are attempting and if this will work, but how about this simple matrix using an array formula and some conditional formatting.
Array Formula in F2 (make sure to press Ctrl+Shift+Enter when exiting formula edit mode)
=MIN(100,SUM(IF(B2:E2<>"NULL",CHOOSE(B2:E2,100,90,80,70,60,50,40,30,20,10))))
Conditional Formatting defined as shown below.
Red = 100 value where it comes from a 1
Yellow = 100 value where it comes from more than 1 factor, but without a 1.

Counting the total number duplicate specific values in 2 columns

I am using Office 2007 and have this formula
=SUMPRODUCT(SUBTOTAL(3,OFFSET(K5:K254,ROW(K5:K254)-ROW(K5),0,1)),--(K5:K254="24""")) + SUMPRODUCT(SUBTOTAL(3,OFFSET(O5:O254,ROW(O5:O254)-ROW(N5),0,1)),--(O5:O254="24"""))
and appropriate one for each of the 17", 19", 22" and 23" monitor special row boxes that I need to have an accurate count of.
My problem is that for some reason the above formula will only count from K:K the number of monitors but will not do the same on N:N
I tried
=COUNTIF(K:K,"24""")+COUNTIF(N:N,"24""")-COUNTIFS(N:N,"24""",O:O,"Personal")
but it will get me the circular reference warning error even if at first I do get correct number of monitors, but after the error flashes the value is 0.
My goal is to have a formula that can count from 2 separate columns (K and N) the exact number of company monitors minus the personal ones when I apply a filter in F-S monitors.
My data has 254 names of users with other details and for the monitor evidence data is listed as below:
K column has Monitor1: 17", 19", 22", 23" and 24"
L column has HP, Lenovo, F-S, n/a
N column has Monitor2: 17", 19", 22", 23" and 24"
O column has HP, Lenovo, F-S, n/a, Personal
Your help is very appreciated.
This is the same formula adjusted to apply to N rather than K:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(N5:N254,ROW(N5:N254)-ROW(N5),0,1)),--(N5:N254="24""")) + SUMPRODUCT(SUBTOTAL(3,OFFSET(R5:R254,ROW(R5:R254)-ROW(Q5),0,1)),--(R5:R254="24"""))
Simply adding the two together might be what you want.

Resources