Excel counting issue - excel

I'm working on this example sheet and I'm having trouble.
Specifically, I want to know how many different people may be scoring the same result. I need to know the function because it needs to be applied on a much, much larger scale.
For example, persons c, d, and e, all had total scores of 23. Persons f and g both had total scores of 26. Person a had a total score of 75. I need to show that 3 people scored 23, 2 people scored 26, and 1 scored 75.
I've linked the sheet I'm playing around in to work out the function, so any help would be hugely appreciated.

What you're looking for is found here.
Use =COUNTIF(*range*, *value*)

I think I worked out an adequate work-around.
Sorted column a alphabetically and used a "=IF(A45=A44,"",SUMIF($A$3:$A$65,A45,$B$3:$B$65))" to avoid repeating the same total being printed, over and over, for all players, allowing me to use =UNIQUE and then =COUNTIF to identify the unique scores and how many people scored particular scores.
Didn't really want to sort, but it will have to do.

No need to sort the data with this formula:
=IF(COUNTIF($A$3:$A3,$A3)<>1,"",SUMIF($A$3:$A$65,$A3,$B$3:$B$65))
The formula shows the total score for each player only the first time that a player appears in column A. The formula assumes your data is in range $A$3:$B$65 (change as needed).
Note the missing $ in COUNTIF($A$3:$A3,$A3)
To try, just enter the formula in cell C3 (or any other column at row 3) and copy down to the last row of your data.

Related

Detect running competition winner`s starting number in Excel

I have a task in in excel and I can`t think of the solution right now.
So I have a spreadsheet with running competition results: The table looks like this
So I need to detect which is the fastest runner that has ran all 3 laps (the winner) and detect the number(Nr) of the winner.
The F column is for calculations if needed
So I detected who had ran all 3 laps with this formula:
=IF(COUNT(C2:E2)>2;SUM(C2:E2);"DNF")
Then I determined who is the winner by running a min formula:
=MIN(F2:F79)
Now I need to detect what number the winner has, So it will be in the A column and in the same row where the row where =MIN(F2:F79) result is.
This is an task so manually finding it won`t work this time.
It is probably a really simple solution but I can`t think of it right now so it would be really nice if somebody could help out.
You can achieve this utilizing Index - Match.
The formula you would place in cell H2 would be as follows:
=Index($A$2:$F$79,MATCH($G$2,$F$2:$F$79,0),1)
What this does is it looks at the whole table and takes the Winner total time (cell G2) and matches it with the corresponding value in Column F, and then returns the first column (Column A).

Using COUNTIF but not including blanks with other formula

Firstly, apologies if this is covered somewhere deep within the site, I have looked through a lot of other posts and none of the solutions have worked for me.
I'm creating a workbook for a local league I'm involved in and this is the only sticking point I'm coming up against.
In cell J55, I have the formula:
=IF(C11=H55, COUNTIF(D11, "="&E11),0)+IF(C19=H55, COUNTIF(D19, "="&E19),0)
(I've simplified this to only look at rows 11 & 19 for the purposes of this question)
So what I'm essentially saying is if the team name is equal to the corresponding name in the table, count if the scores for both teams are equal. Basically I'm trying to get the number of games that end in a draw.
So at it's core, my formula is looking for whether 2 cells are equal. This is fine, other than it is counting even if the score cells are blank.
So if you refer to the below image, in J55, I'm getting the returned value of "2". However for the values I've populated in the results (just the scores in the first game) it should be returning a value of "1".
If anybody can help in any way it would be a great help.
To count the number of Draws this formula which performs array like calculations will count the number of occurences where where the team name in H55 is equal to the team name in column D or F and when the scores in column D and E are equal:
=SUMPRODUCT((($C$11:$C$21=H55)+($F$11:$F$21=H55))*($D$11:$D$21=$E$11:$E$21)*($D$11:$D$21<>"")*($E$11:$E$21<>""))
Copy down as required.
COUNTIFS options
Based on your formula above, adding the checking for not blank cells using COUNTIFS.
=IF(C11=H55, COUNTIFS(D11, "="&E11,D11,"<>"&""),0)+IF(C19=H55, COUNTIFS(D19, "="&E19,D19,"<>"&""),0)
COUNTIFS is probably the slightly better option as it does not use array calculations. However for a small data set it wont make a noticeable difference in calculation time for most users.

EXCEL calculating average with OFFSET (coord unspecified) of a given keyword

Fun situation I'm trying to calculate. Basically in one row I have names of products, and the row to the right of it the number of days that have passed since the product was first received.
The calculation to do the days for ex is
=TODAY()-BB2
What I'm trying to do NOW, is identify let's say the product word "truck," and then calculate how many days on average the holding time of truck is.
I understand the logic of the formula I need, just not how to execute precisely. Basically the formula is going to need to use this average calculator with a keyword identified COUNTIF
=COUNTIF($A$2:$A$900,"TRUCK")/COUNTA($A$2:$A$900)
What I'm missing is some type of...IF "TRUCK, OFFSET (GIVEN CELL) -1)
Thanks for any thoughts!
-Wilson
A formula (in C1 in the example):
=AVERAGEIF(A:A,"truck",B:B)
should work but I would recommend a PivotTable for the additional functionality it provides:

What's a better way to return a cell that matches conditionals in two adjacent columns?

I have a spreadsheet with player names, team names, pts per game, and the rank of a player on their team by scoring.
On another sheet I want to return the pts per game value for specific team names and ranks.
I know I can just sort the list by team name and then copy and past each set of team numbers, but I want to learn how to make Excel do this for me. I know I could use Index and Match if I only had a single conditional (ie, return the pts per game where playername column matches...), but I don't know how to make it check for the team name AND the rank.
I did some googling from my desk, and didn't see any clear answers to what I'm thinking about.
I'd appreciate any pointers. Like I said, I know I can do this manually, but I like learning how to make Excel do this for me.
EDIT:
Here's some screen shots. http://imgur.com/bZX0bP7,JboMmop#1
Since you already have a column of the rank, this is a bit more simple. I am assuming that your "rank" column is column D, "PTS" is column C and "Tm" is column B. In F1, type "ATL", and in F2:F6 enter the numbers 1-5. Now, in cell G2, enter the below formula:
=Sumproduct((B:B=$F$1) * (C:C) * (D:D=G2))
Now, drag this formula down from F2 to F6 and you will have a rank of the top 5 players for "ATL". You can change "ATL" to any team you choose, and you can change 1-5 to any rank you want.

Excel Counting non blank cells

I am having no luck trying to count my non blank cells in excel. I have tried multiple formulas and I keep getting inaccurate data. Here is the situation:
I am creating a Preventative Care list for my physicians (I have 4) I created a list of all their patients that have received a letter re: Prev. Care and I am inputting who needs a second letter and who has results. Some results are negative, some are positive. I have the list set up in alphabetical order on patients last name and then I have their physician initials in the other column. I want to check to see what percentage of each doctors patients have done their prev. care. I want to calculate this separately. Unfortunately, the cells are no in order. I have tried everything to my knowledge.
Help!
This will give you how many blank cells you have. You can deduct this from the total number of cells in your column, or you could use this directly to compute your percentage as (1 - x) where x is percentage of blank cells.
=COUNTBLANK(<your column>)
E.g:
=COUNTBLANK(A1:A10)
If it's not immediately obvious how to count the total number of cells in a range, this formula should help explain, answering the original question fully. It works with ranges that span more than 1 column, too.
=ROWS(range)*COLUMNS(range)-COUNTBLANK(range)
You might try something like:
=IF(LEN(A1) > 0, 1, 0)
You can then sum that column or do whatever other calculation you need.
=COUNTIF(range,"<>"&"") will count all cells that do not have a value equivalent to "", so, basically anything that is not blank.

Resources