Count the number of dates that a criteria is met - excel

I have a worksheet with over 30,000 entries in it of work logs submitted by a team of 15 individuals. I've broken this down using a range of countif/sumif/sumproduct formulas to try and summarise the data but am struggling to get one to work for counting the number of days a worklog was submitted by each member of staff over the period(baring in mind that each date the members of the team are working they are submitting multiple worklogs for various types of work).
I understand this is easily done with a pivot table but am trying to avoid using them for this as it will need to be presented/used by other members of staff who are not regular excel users. I would like to make this as simple for them as possible while being able to use the number of days they were at work to calculate averages etc.
I suspect I'm missing something easy here but any advice anyone can offer would be really appreciated.
The dates are in D41:D32038 and names of the workers that submit them in F41:F32308. Thank you.

First Pivots are the way to go, but try this array-formula:
=SUM(--(FREQUENCY(IF(F41:F32308="name of worker",MATCH(INT(D41:D32038),INT(D41:D32038),0)),ROW(D41:D32038)-ROW(D41)+1)>0))
Change name of worker' to the name you're looking for
The result should be the count of (unique) days for a worker, Close Formula with CSE

Related

Crop order scheduling in excel

I am looking for some advice, I have a small micro green business and I have an excel sheet that breaks down the seeds, seed batch amount required, yield etc and so on.
I want to create a tab where I can input a customer order, I then want excel to schedule that order based on the information contained above in a calendar format on a tab.
I also want excel to calculate the amount of seed required number of trays and assign the tray a number. All trays are number in this format "A123, A124, A125" etc.
I'm also keen for excel to then assign the seed batch to the order and a tray number to the order.
Firstly is this possible, I've used excel a fair bit from my previous work experience but this is quite new for me and I am keen to learn so if someone could point me in the right direction on a possible method and what I should be looking at!
It sounds like you are looking for a data(base) structure for this challenge. Yes, that could be done in Excel, some VBA skills will probably come in handy if you want to achieve it automatically. As a first step, you could e.g. set up something like this:
Mockup of a data structure
So you would at least need one table where you enter your orders, one list of trays and one table where you link your incoming orders to the trays. You might need more columns than I added in my mockup.
Hope that gets you started

Getting the header of the two matching criterias, for multiple tables

Hoping you can help me out.
I have a total of three tables here. I've been trying to figure out a formula that will give me the header (the names) of the two criteria specified in H1 and H2. I was able to get the result I want, but for the first table only (Hailey).
The problem is to find out who among the three teachers handled the "subject" within the specified month as well.
Also, I couldn't figure out how to get all the results if ever there are two names that match the criteria. Thank you in advance for your help.
as Jeeped said above this is essentially bad database/table methodology but it is not hard to fix, what you need to do is create three columns one for the name, subject and month.
Then what you can do is just run a simple SQL/Google Query to find out who is doing what.
I've created a template based of your screenshot above but with three columns, have a play around and if you redesign your spreadsheet just let us know and we can help you to design a query for your issue.
use the drop downs to get your desired query, if you select name & month you get that range, if you select a month you get all names for that month.
https://docs.google.com/spreadsheets/d/1yERKtQocnVqopqh6CCn6Rdj143bYyr_IjSDnzCLSm_8/edit?usp=sharing

Excel - Return name from list based on multiple criteria

This is my 1st post here (and not allowed to paste images). I have been trying to solve this issue for a couple of days with no luck. I'm working on an Excel spreadsheet for a game and cannot return a name based on multiple criteria. See below:
Table
I am trying to return, for example, the name of the Guardian with the highest amount of games played.
I've tried Index/match/sumproduct combinations but I can't figure this one out. Can you help me?
=index(Data!$A:$H,match((1,Data!B:B=Overview!B12)*(Data!C:C=Overview!B23)),0),1)
=MAX(IF(Data!B:B=Overview!B12,Data!C:C))
I'm thinking if I could join these two formulas together I might be able to make it work.
Try this array formula:
=INDEX(Data!$A1:$A99,MATCH(MAX(Data!$C$1:$C$99*(Data!$B$1:$B$99=B12)),
Data!$C$1:$C$99*(Data!$B$1:$B$99=B12),0))
CtrlShiftEnter
Notice that we should avoid using "full columns" in array formulas because they would introduce the computation of huge arrays and hence would slow down the formulas. I limit it here to 99 rows, use a limit that is big enough to span your data.

In Excel VBA, how do I select rows containing specific values in a column and hide them?

I'm trying for the life of me to figure out Excel VBA but I've been getting nowhere.
Here's what I'm needing to do:
Have a list of thousands of entries - each one corresponding to a ticket for a customer. Columns include information like client name (Column B), # of minutes worked on per ticket (Column I), etc.
We're trying to make a macro that totals the # minutes of worked on for all tickets of a specific client in a new row directly below, then hide all of those rows.
The end result should be only seeing a row containing "Total -client name here-" in the name column, then the total number of minutes in the # of minutes column.
The previous macros I've done aren't dynamic and were done via recordings within excel (which obviously don't work the way I wanted to, apparently).
Programming isn't my forte, and all this has been doing is making me want to pull my hair out. Any help?
It sounds like you'd be better off using a database like Access. You can enter all your information into a table and then write a query to find what you need. If you don't want to use Access, we'll need a better idea of what you're trying to do.

Excel Lookup with multiple queries

I have a question that I a may not be thinking correctly about. But I have an a long excel file that I pull from somewhere else with the following columns:
Project_Name1, Employee_Name1, Date_Worked1, Hours_Worked1
In another sheet I have these columns
Project_Name2, Employee_Name2, Begin_Date2, End_Date2, Hours_Worked2
This second sheet is filled with data, and works just fine.
However, it turns out that I have some employee names that I do not know that are also working on the same project. I need to figure out the names of the employees and then sum the number of hours they worked for a given period.
So I need a lookup with three criteria:
Project_Name1 = Project_Name2
Employee_Name1 <> {Array of Employee_Name2}
Begin_Date2 <= Date_Worked1 > End_Date2
Returning Employee name.
Once I have the employee name, I can do a sumifs=() and get the total hours they worked no problem.
I have tried a number of combinations of Index Match functions, using ctrl-shift-enter... and have not been able to figure out it. Any help would be greatly appreciated.
What you're talking about doing is extremely complicated and a little bit past what Excel was designed to do by default. However, there are a few workarounds that you can use to attempt to get the information that you're looking for.
It's possible to do multiple-criteria VLOOKUPs and SUMIFs by concatenating fields to make a multi-part identifier (Ex: Insert a new column and have a forumla in it like =A1&B1)
Open a new workbook and use Microsoft Query (I'm not sure if you can select from more than one sheet, but if you can select from multiple sheets like tables you should be able to write a semi-complex query to pull the dataset you want.
http://office.microsoft.com/en-us/excel-help/use-microsoft-query-to-retrieve-external-data-HA010099664.aspx
Use the embedded macro feature and use visual basic script to write out your business logic. (Hotkey is ALT+F11)
One way to do this would be to first create an additional column to the right of entries on the sheet you're trying to pull employee_name from: =ROW()
You could then use an array formula like you were trying to implement to pull the corresponding 'match' row:
{=SUM((project_name1=projectname2)*(employeename1<>employeename2)*(begindate<=date_worked1)*(date_worked1>end_date2)*(match_column))}
You could then use this returned match_column entry within the index as you described to retrieve the appropriate entries.

Resources