Trying to count total from repeat names - excel

I am not sure how to explain it in words but having a look at the table will make it clear.
screen shot of Data from excel

To auto count try-
=LET(x,UNIQUE(A1:A16),y,COUNTIF(A1:A16,x),CHOOSE({1,2},x,y))
For auto sum-
=LET(x,UNIQUE(A1:A16),y,SUMIF(A1:A16,x,B1:B16),CHOOSE({1,2},x,y))

Related

sum up days using only existing Excel formulas

I would like to sum up date periods and sum the days per item.
The input data will grow over time and new item categories can appear, so the items (number of rows) that show in the expected report can not be "hardcoded".
The input parameter is the from and to date that determines the period that must be considered. You can imagine this as a moving date window on the input data grid.
I am a Java programmer and I am sure that I can write a proper SQL that groups and sums the data and generate the result. And I can write a Java program too, that does the job, but I really want to do this calculation from Excel.
Is there any way to generate the report by using only a combination of existing MS Excel formulas without writing any Visual Basic code (macro)?
If yes, then could you please put me in the right direction and tell me which formulas I can use? Then I can figure out how to use the formulas.
I hope that this helps to understand better what I would like to have:
Try:
Formula in F3:
=SUM(COUNTIFS(C:C,E3,A:A,"<="&SEQUENCE(H$2-F$2,,F$2),B:B,">="&SEQUENCE(H$2-F$2,,F$2)))
Note that range references that take whole columns will take long to process all data. The above will work even with overlapping dates.

how to fill missing values with a specific set on string values

This is my DB,
its got too many missing cases for me to do it manually, and I can not use flash fill in this case,
so I want to randomlly fill these case with a specific set of strings :"TCS", "TCLSH","TCEO", and "TCT"
how can I do it in excell please help and thanks a lot in advance
You can do this in a separate column using index with randbetween (per screenshot / this sheet) as follows:
=IF(B3="",INDEX($H$3:$H$6,RANDBETWEEN(1,COUNTA($H$3:$H$6))),B3)

How can I Use autofilter in Excel if the person is occurring in two columns?

I've a game schedule where I do the referee nominations - please see the file
I want to be able to filter the columns gym, date and referee. I know how to do that on gym and dates, with the Autofilter. My problem is the referees, because the same referee can appear in bot columns referee 1 and 2 . Can you suggest any solution to this problem?
My second question is: I want to list each referees partners, thought to solve this with Pivot table - is pivot table the best solution, or du you have any other solution?
Thanks in advance for your help
Peter
file: https://www.dropbox.com/s/p798eq4u89...lish.xlsx?dl=0
MY COMMENT: I didn't look at your file but a generic approach to "normalizing" this list is to put all referees in the same column and create another column for whether they're #1 or #2 in that instance. This generally make pivoting and other data analysis easier.
So again, I haven't looked at your sheet (because I'm careful that way) and unfortunately SO doesn't let you post a picture yet, so this is just how I'd do it based on your words:
To the left is the table and to the right the pivot. You can see the referee number column that I proposed in the table. I didn't use it in this version of the pivot, but I suppose it might be handy somehow. The pivot shows who's reffing what game and let's you see at a glance that there's two different refs per game, who they are, and that they're getting their days off.
Here's how I set up the pivot:
I hope that gives you some ideas.

Get Average of a range

I am trying to get the average of a set of numbers using a table column as the range. For some reason I can't figure this one out.
What I have so far;
=SUMPRODUCT(--(Table1[Incident ID*+]<>""),--(MONTH(Table1[Reported Date+])=MONTH(1)),--(YEAR(Table1[Reported Date+])=A2))
The column I want to get the average for is
Table1[Time Count]
If you want average, use AVERAGEIFS. Why SUMPRODUCT???
But as you need conditions based on calculation from cells, MONTH(Table1[Reported Date+])=MONTH(1) and YEAR(Table1[Reported Date+])=A2, you will have to create one column in your source data to handle this.
Then you can simply use
=AVEREGEIFS(Table1[Time Count], "<>""""", Table1[Incident ID*+], MONTH(1), Table1[Reported Date+_MONTH_COLUMN]), Table1[Reported Date+_YEAR_COLUMN]=A2)
Why are you using --?
Have you tried this yet?
=Average(Table1[Time Count])

Adding new data in excel and cannot be sorted or filtered

I have a column with 595 rows. Then I proceeded to add 20.
(Note this excel sheet with the 595 entries was already in place before I started working on it. The sort feature was working correctly, as was the filter feature).
So now, I can still USE the sort and filter methods, but it does not take into account these 20 new rows. Any ideas?
Also, I cannot remove the borders on these 20 new rows. They are pretty thick and say I just did 'no borders', it doesn't modify anything.
It seems like there's a 'cutoff' at 595 or something. Very weird.
Another solution which may not be as obvious is to Un-click the filter button under the data tab and then re-click filter.
I had the same problem. After 45 minutes of experimenting and 'googling' for solutions it turned out that the new names I had entered did not have a space in front of them like ALL the other names in that column did. So check to see if the data in the columns are the same distance from the cell wall. If they are different, try adding or removing a space and re-sort. Good Luck
I had the same problem using an absence tracker downloaded Excel worksheet from Microsoft, where I added 30 rows. I fixed the problem by clicking/activating the table and viewing the design tab. Click Resize Table and edit the table range. This color coded the rows and allowed the filter to include the added rows.
I had this same problem, expanding the 'fill handle' as John Bustos (Nov 12 '12 at 17:29) suggested was all that I needed. I didn't have to turn filters off and on afterward either.
When you set up the Filter, it accounts for the range of data you initially have. When you add rows, they are outside of that range. So if you have one additional column that has something in it, like the word "blank" or just "X" or something, and make it go down to row 1000 or 2000 or something, then when you add information in new rows, it should keep the full filtered range, and the sorting would also include the full range, all the way to the row 1000 or 2000 or whatever you make.
As #JohnBustos suggested, the 'zebra' type row color is an outcome of choosing a certain condition in a pivot table.
When you add new rows to a table extracted from Pivot table, in order to include filter conditions/ sort for newly added rows, you need to -
Go to far bottom right in row 595,
you should have some kind of a fill handle,
drag it down to now include your new rows too.
Make sure there isn't a space before the new data. That will sort in two batches.
There's a little handle at the bottom right corner of your table (as it exists)...drag this to the bottom of where your new data exists, and it should auto-expand the table to include the table design + filtering. Took me forever to figure out

Resources