duplicating count or only looking for 1st statement - excel-formula

Link to sample spreadsheet: attendance tracking
The tab to look at is the AM Classes. We need a count of how many students attended a class/group that day but it must be unduplicated. Such as some students may attend more than one STEM class in a day, but how many they attend in one day doesn't matter. We only need it to count the student once for that day in the STEM group. What I have is two different options (G1027 & M1027) but they aren't working correctly. I hope this is making sense. Attendance will be entered in using set codes (different letters of the alphabet- A1027 shows the codes.) What we need to track and their codes are in column C at the bottom (the blue lines.) I was also given the suggestion of having the formula look through the cells in that days column and find anyone of those codes and if it did, to use another column that is filled with 1's to do the actual counting (Column F). I'm not sure how to set that up though.
Thank you so much for looking at this. We have struggled with this for a while now and have had it on google forums and no suggestions on how to fix it. Below is a snapshot showing a section of the sample sheet and what we are struggling with. Thanks again.
screenshot

Try G1027:
=SUMPRODUCT(REGEXMATCH(G4:G1016,"(?i)[aglmpst]"))

Related

How to count pairs of cells in alternate rows

I am preparing a weekly time-table for my school which looks like the following
The even rows contains course names, whereas the odd rows contain the teacher initials. Observe that a same paper is taken by more than one teacher (e.g., C10 C11 and G10 G11). I need to count the total number of classes per course per teacher in a week. Please help me to achieve that.
My efforts so far have been very inefficient.
I calculated the formula in B71 for each row in the entire time-table and added all the quantities in B70. However I need to have a comprehensive list of all courses with divisions for all teachers. I am not being able to generate that.
Thanks in advance.
You where pretty close in your attempt. You could use the following in B70 and fill down and to the right:
=COUNTIFS($C$10:$P$67,$A70,$C$11:$P$68,B$69)

Need to convert / transpose from row-based to column-based

Help needed please!
I’m building a parkrun spreadsheet and need help with one column. A friend of mine has a spreadsheet of his parkruns where he has successfully achieved this calculation, but he records them horizontally, whereas as I do mine by column, as per most databases. I have managed to adapt the other columns in my spreadsheet from his example, except for the ‘Tourist Streak’ # one (highlighted in yellow). I just wonder if someone could get this working in my column version please?
The Tourist Streak calculation is defined as follows: The highest number of consecutive different events attended
This one is driving me crazy!
My friend’s row-based version is here
My column-based version is here
Thanks in advance!
I thought I would have a go at this, but ended up using a different formula. The idea is that the countif looks back only to the beginning of the current sequence of unique venues to see if the current venue is duplicated and resets the length of the sequence according to the last appearance of this venue if so (I have used the word 'venue' to avoid confusion with 'run' meaning a sequence).
Starting with 1 in B2, place this formula in B3:
=IF(COUNTIF($A2:INDEX($A:$A,ROW()-B2),$A3)=0,B2+1,
ROW()-AGGREGATE(14,6,ROW($A$2:$A2)/($A$2:$A2=$A3),1))

Calculating Multiple Averages

It's my first time posting a question to this forum. Though I have found answers here many times before, I have been unable to find a solution to my current predicament.
I work in a call center and each week I need to analyze data from the thousands of call that took place over the week. I'm new to programming in Excel-VBA but I've been able to get pretty far.
The data is produced by a third party program and the format is nigh unreadable. Much of the programming I've done so far has been geared towards making the data more organized. Now, I'd like to get into more analysis.
The data is arranged by employee number (NOT in order, though). Each employee takes several calls over the course of the week, some for which the customer takes a survey. It's the survey scores I want. I want to take the average of all the surveys for each employee and then display that average in the same row as each of the entries.
Example
The yellow highlighted area is what I want to add. Any ideas? Thanks for any help in advance!
No need for VBA. If you have the supported version of Excel you can use AVERAGEIF. If not you can use below formula.
Enter as an array formula by pressing Ctrl+Shift+Enter when exiting cell edit mode (instead of just enter).
=AVERAGE(IF($A$2:$A$13=A2,$B$2:$B$13))
Then copy down for all rows.

Calculate "cell/sum(cells)" script across hundreds of small sets

I'm new here, and would greatly appreciate some help with this problem. I'm trying to take a column (Column H in this case) that's split up by blank rows into a few hundred sets of 21 cells each and find the portion of each cell to that set.
Picture - Objective: Take a cell and divide it against 21 other cells in that set. Skip the blank row and repeat the same process several hundred times.
For example, I want to find out: "In 2015, what portion of Alabama employees were in Management Occupations?" and come to the conclusion that 3.669% were in management (Solution example would be cell [I3]). I want to calculate that for all states across all occupations across all years.
I am currently doing this by typing out what's found in column K to get the solutions found in column I, but that is very laborious and seems inefficient. How would I go about getting solutions found in Column I in the easiest way possible?
Please note that the groups must be broken up by state, which is why there are blank rows between each state.
Thank you very much, and if you need a further explanation of what I'm trying to accomplish, please let me know and I'll respond immediately!
Use SUMIF():
=H3/SUMIF(C:C,C3,H:H)
It will now group the it by the state.
If you want to group it further then use SUMIFS():
=H3/SUMIFS(H:H,C:C,C3,A:A,2015)
This will group it by the state and year 2015.

Excel Formula Questions, please help me not have to work this weekend

If this has been discussed, I apologize. My boss just gave me a last minute project that needs to be completed by Monday and I am hoping someone could help tell how to complete this in a matter of minutes, not hours. I have very basic excel knowledge unfortunately, I will try to explain the best I can but I apologize in advance if there is something I didn't include or should know.
In my spreadsheet, D1-D34 has every model # of a specific brand that my company has sold last month. On a separate website, there is a chart that lists a "reward" associated with particular model sold. I can copy and paste that list into excel. When I do that, the eligible "model's" are on D56-D975, with the price associated each are on E56-E975.
Is there any formula that I can run that will basically do all of the manual work for me so that if one of the models in D1-D34 match one of the models in D56-D975, then the "reward" associated would appear in E1-E134?
Thanks a bunch. Hopefully I can get this resolved quickly and have some sort of weekend with my family.
InE1 enter:
=VLOOKUP(D1,$D$56:$E$975,2,FALSE)
and copy this down thru E34

Resources