I am trying to find the max score and then offset left to find the name of the person that scored. However, the link below only allows for one column and one row at a time.
https://www.mrexcel.com/forum/excel-questions/472213-offset-formula-using-max-determine-reference-cell-location.html
This is not what I need. I need to have an equation that allows me to find the max score and then offset that to the left by one and take the name. I will need it for multiple columns and rows in the same equation that can be easy to read. I have come across equations like this.
ADDRESS(MAX((A154:H174=MAX(A154:H174))*ROW(154:174)),MAX((A154:H174)*COLUMN(A:H)))
Sorry for not having a picture I don't have enough reputation. It was a screenshot of my spreadsheet. Thanks for any help that you can provide.
I am open to suggestions and edits on this post. I do desire to improve and use this more often.
Try this, assuming your data is names in A1:A9 and the score in B1:B9
=INDEX(A1:A9,MATCH(MAX(B1:B9),B1:B9,0))
Related
I'm in a problem as per the question, i want to display the data on the basis of heading. Heading's position may subject to change from column A to C per week, so =InputA1 formula is not what i need.It have to match both tab headings and display under output tab ( under the matching heading ).
One more thing i need is input may contain huge data where i want to
avoid the row if stock less than 10
avoid the row if code is empty
avoid the row if UNC is 0 or blank
A sample sheet is dropped below where there is estimated output also. Please help me.
https://docs.google.com/spreadsheets/d/14W6mLw4Z-1DN4TwHxbwx8KRcNfRg9u_B6m1dA0JjtSQ/edit#gid=692673040
Thanks
Please checkout the solution added to your output tab.
=QUERY(BYCOL(A1:F1,LAMBDA(afx,FILTER(input!A:F,COLUMN(input!A1:F1)=XMATCH(afx,input!A1:1)))),"Select * Where "&"Col"&XMATCH("STOCK",A1:F1)&">=10 AND "&"Col"&XMATCH("CODE",A1:F1)&"!='' AND "&"Col"&XMATCH("UNC",A1:F1)&"!=0 AND "&"Col"&XMATCH("UNC",A1:F1)&" IS NOT NULL",0)
-
I created a column of total profit in google sheets and my goal is to filter values which are less then 70% of previous profit value (screenshot so you can understand).
But when I apply this condition to the filter custom formula (here) is not filtering the values which are less then 70% but the values before them, instead it is moved by one row (hopefully you will understand).
It may be it is something easy to fix but i really couldn't find out. Thanks for your future advice and time!
*EDIT: https://docs.google.com/spreadsheets/d/1JcHVrpOCLEdMiTF3YD0qvJiHPsi6J2QwFPN-XOfAipY/edit?usp=sharing sheet in view mode
try to shift it:
=$B2/$B1>0.7
I tried to plot arrival delay and departure delay columns separately, it's clear the distributions are different.
I would like to show them on the same plot, but whenever I try to do so, both plots became one identical shaped distribution although I'm plotting two different columns! What am I doing wrong?
Thank you for your help in advance.
You need a Departure Delay (bin) field. You can create one by selecting Departure Delay in the data pane on the left sidebar and selecting Create bin.
Once you have that new field, you can place it on the Columns shelf next to the other bin field and just put SUM([Number of Records]) on the Rows shelf — getting rid of both CNT() fields.
That should let you see both histograms.
To answer your question about why your previous approach yielded the same chart, you were binning data in both cases by the Arrival delay.
The CNT([xxx]) fields are misleading. That just counts the number of records that have a non-null value in the [xxx] field. If [xxx] always has a value, its equivalent to SUM[Number of Records]). The bin field is what matters.
I am trying to find the average of the seven most recent entries in a row, as seen in
this
spreadsheet.
I found a few questions similar to mine, but I am still pretty confused on how the answers work. The questions similar to mine can be found on the left side of my spreadsheet.
I think that the formulas would work for me with a few simple adjustments of which values to use, but I can't seem to figure it out. I would really appreciate if someone could explain one of the existing answers or come up with another one that works.
The spreadsheet is updated daily, so I need something that would continue to work as more and more data is added to the column.
Try:
=round(AVERAGE(OFFSET(H1,MAX(ARRAYFORMULA(ROW(H:H)*--(H:H<>"")))-7,,7)))
here's working sample
Explanation
We are getting the last non empty row: MAX(ARRAYFORMULA(ROW(H:H)*--(H:H<>"")))
Then with offset formula we are getting the range of last 7 cells in a column.
And then just use AVERAGE.
More info
You may find more info about finding the last non empty row here:
Selecting the last value of a column
Another way is to use INDEX and MATCH. The first match finds the position of the last number in the range and takes 6 away from it: the second match finds the position of the last number in the range. Passing it through the INDEX function gives a reference that you can use to give a range of 7 cells for AVERAGE to work on.
=average(index(H:H,match(999,H:H)-6):index(H:H,match(999,H:H)))
So my answer is like your Link2
The big snag here is if you have a text cell in the range (like "Nothing") it is much more difficult to work out which cell to start from to get an average of 7 cells. I think I know how to do it in Excel using OFFSET but offset doesn't seem to work in the same way in Google Sheets.
However I can see there is a solution to this in your Link3 which should work for you if you change A:A to H:H and SUM to AVERAGE. I have tested it on the average of the last ten cells which includes a "Nothing" cell:
=ArrayFormula(AVERAGE(QUERY(SORT(H:H,ROW(H:H)*ISNUMBER(H:H),0),"select * limit 10")))
and it gives the correct answer 61.8.
The way array formulas work in general is that instead of passing a single value to a function you pass a whole range or array (a list of values) and the function processes them one by one. The above formula takes the whole column H:H and sorts it on the row numbers in descending order but those cells which don't contain a number give zero in the multiplication and are sorted to the bottom. Then the query takes the top (in my case) 10 cells and passes them to AVERAGE.
BTW this doesn't have to be declared as an array formula: this also works
=AVERAGE(QUERY(SORT(H:H,ROW(H:H)*ISNUMBER(H:H),0),"select * limit 10"))
I am attempting to display a progress percentage in a single cell based on the choice of "completion" from a data validation list that spans multiple columns and cells.
I have attached a screen grab that will hopefully better explain. I would like the "Overall status cell (B3) to display the percentage of "Completes" that will track overall progress of requirements.
I have narrowed to a "sumif" function based on research and former templates but cannot achieve the desired result. Any help would be excellent. Thank you in advance.
You would want to do a =(COUNTIF(C5:C100, "Completed")/COUNTA(C5:C100)).
Obviously, you might want to change the range.
E2A: =SUMIF adds numbers together. Because you're looking at Text, you'll want to do a =COUNTIF and =COUNTA.