Rewording the question as I've tried the responses (thank you very much for those) but they're not doing what I need.
Master tab has hundreds of candidate records on it from a large range of dates over the last year. I'm interested in 2 columns.
Col A contains the date the candidate took the exam
Col B contains the candidate grade (Distinction, Credit, Referral)
On a new tab, I need to report on how many Distinctions were achieved, how many Credits and how many referrals for last week only
This will need to be repeated each week on a new tab (difficult boss!) so I need to make it as easy to repeat as possible
Please list the grades uniquely (say in ColumnA starting in Row1) then in B1:
=COUNTIFS(Sheet1!A:A,">42005",Sheet1!A:A,"<42012",Sheet1!B:B,A1)
and copy down, where your data is assumed to be in Sheet1. The numbers (42005, 42012) are the numeric representations of the relevant date limits (eg 42005 is what my system shows for 1/1/2015 in Numeric format).
I think this should work. So for column A1 to A6 I check whether the date falls between a certain range. In my case between 7/03/2015 and 19/03/2015. Then I just want to count the items containing DISTINCT/CREDIT/REFERRAL.
=COUNTIFS($A$1:$A$6;"<20/03/2015";$A$1:$A$6;">06/03/2015";$B$1:$B$6;"DISTINCT")
=COUNTIFS($A$1:$A$6;"<20/03/2015";$A$1:$A$6;">06/03/2015";$B$1:$B$6;"CREDIT")
=COUNTIFS($A$1:$A$6;"<20/03/2015";$A$1:$A$6;">06/03/2015";$B$1:$B$6;"REFERRAL")
Related
thank you for taking a minute to help me!
I have 3 sheets, 3 of them with daily data of users, vehicles, and population which is steady, all of them have the same structure:
D column is location and the rest are daily results. Results change every 14 days, that's why for each location you are seeing the same data.
And there's a 4th, where I want to concentrate results from the previous sheets based on data and location - location is D column:
I want to set both start and end date and based on that, sum daily results by location. For example, suppose that Inicio - Start date is 01/03/2020 and Termino - End Date is 05/03/2020, in the second image, where I highlight SUM HERE it should appear 227,340 for 001-L1 Dr. Galvez N.
I already tried SUMIF, SUMIFS, SUMPRODUCT but it doesn´t seem to work.
Any ideas?
What didn't work with SUMPRODUCT? Try this - the result is correct:
=SUMPRODUCT((Sheet1!$E$3:$M$3>=$E$2)*(Sheet1!$E$3:$M$3<=$F$2)*(Sheet1!$D$2:$D$14=D5)*Sheet1!$E$4:$M$14)
I tried to adjust the ranges to your example, but change them if necessary.
I have developed this formula for you (001). Please take a look.
[E5] =SUMIFS(INDEX(Counts1,MATCH($D5,Stops1,0),0),Dates1,">=" & $E$2,Dates1,"<=" & $F$2)
The formula is designed for cell E5 of your fourth sheet. $D5, $E$2 and $F$2 are all on this sheet.
Counts1 is a named range on Sheet1, comprising all the passenger counts, starting from column E, up to the last day of the month and, vertically, from row 4 to as many rows as there are stations.
Stops1 is another named range on Sheet1 D4:[end of column].
Dates1 is a third named range on Sheet1, starting from E2:[end of row]. I would suggest you set up these named ranges to adjust dynamically to the actually used areas of the sheet.
Now, INDEX(Counts,MATCH($D5,Stops,0),0) defines all cells in the row of Counts where the Stop is equal to D5. Of course, this reference changes as you copy the formula down.
SUMIFS takes that range, extracts and sums up the numbers you are interested in.
Now, if you need to extract the same numbers by the same system from 3 different sheets you simply repeat the formula 3 times, concatenating the results with plus signs. That leaves you with the task to set up 9 ranges instead of only 3, each group of 3 on one of your source sheets. By the system I have implied above you would name them Count2, Count3 etc.
That leaves the question of your dates. They must be true dates. Text strings that look like dates won't do. (I guess you know that :-). In the test sheet I set up I entered =DATE(2020,3,1) in E2, [F2]=E2+1 and copied from F2 to the right.
I was wondering if anyone knows if it's possible to import a data, in a sort of a COUNTIF function but only for the data dated today?
I have 2 sheets, Attendance and Department.
In the Department tab, I have a list of employee's in column A. In column B and so on, I have a drop down option to select which department they're are stationed for each day. Each column represent a day, B being the 1st, C being 2nd, ... and so on. The header for each column has the day for the day as well.
On the attendance sheet, I have the list of Department in column A and in B, it is used to record how many employee are stationed at that department. I also have the day for the day on this sheet on A1.
Is it possible that when I change the date, the number of employee stationed in each department will change according to the date?
Is it possible to do this with just functions?
I've tried using the COUNTIF function, but I've found that I will have to change the range on a daily basis.
Use The Function: in B4 of Attendance Tab
=COUNTIF(INDIRECT("Department!" &ADDRESS(3,MATCH($A$1,Department!$A$2:$P$2,0)) & ":" &ADDRESS(6,MATCH($A$1,Department!$A$2:$P$2,0))),$A4)
Results: Attendance Tab
Department Tab:
I have used all the references as in the screenshots, you can change them if they are different in your sheet.
your question can be solved by SUMPRODUCT function. See below solution picture:
SOLUTION
Just to quickly explain my solution, I gave a name to the date on the Department sheet, called it 'Date_Lookup'; and I gave a name to the dates on the Attendance sheet, called it 'Date_List'. Names will simplify my formula especially when referencing across worksheets.
You will eventually find a lot of COUNIF scenario can be solved by SUMPRODUCT and this is just one example. SUMPRODUCT can do a lot IFs than COUNTIFS can do. In your case there are two criteria, one is which department did an employee attend to, and the other is on which date did the employee attend to that particular department. So my SUMPRODUCT formula can be understood as:
=SUMPRODUCT(('from the list of dates'='the particular date I want to see')*('from the full attendance record'='how many employees went to the given department'))
Let me know if you have difficulties understand my answer. A good 1 hour read through some online articles regarding SUMPRODUCT will help.
Cheers :)
Your first step would be to use a function to work out in which column the entered date appears. So in your Department sheet you enter a date in A1, then set B1 to:
=IFERROR(MATCH(A1, Attendance!2:2, 0), 0)
I use the IFERROR as I don't like seeing errors on my sheet. Assuming the result isn't zero, use a COUNTIF looking for the department letter in a range in the result column. I'd simply use on OFFSET to get the right range, but sticklers would tell you to find a different way of doing it. So long as your spreadsheet isn't going to increase in size to a massive complexity, OFFSET is fine.
I'm trying to work out the maximum number of times a user has accessed the system in a day. There are different dates that they have accessed the system but on some days they have accessed the system more than once and I want to find the day with the highest number.
There are 4 columns: 1. Name (A) 2. Date (B) 3. Total Daily Accesses (C) 4. Highest number of times accessed in a day for each user (D)
I've copied in the formula below which isn't displaying the highest number of times accessed in a day:
=MAX(C:C,A)
If anyone could advise where I am going wrong, I'd really appreciate it.
Thanks
1) Generate a list of unique names using this formula modified to suit your ranges:
=INDEX($A$2:$A$20, MATCH(0, COUNTIF($B$1:B1, $A$2:$A$20), 0))
The above formula taken from this question
2) Assuming you generated the list of names in column F and lets assume the range F1:F10
=Aggregate(16,6,(A:A=F1)*C:C,1)
Copy that down as far as your list of unique names goes.
Let's assume the names are in column A, the date in column B; one line per user and date, multiple users, possibly multiple dates. For the formulas, let's assume data in rows 2 to 22.
We need an auxiliary column to hold the combination of name and date, like in column E:
=A2&B2
for cell E2.
To list the total number of daily logins for each user, put in column C
=COUNTIF($e$e:$E$22,$A2&$B2)
Copy this down for each row holding data.
To get the maximum daily events per user, create the list of users in column F (either manually, or using the answer cited in another answer here). Into each line of the list of users, enter
=MAX(IF(A2=A$2:A$22;C$2:C$22))
as an array formula (close with Ctrl+Shift+Enter).
I'm trying to fill out a sheet with a somewhat complicated criteria, I have four columns I'm interested in, however the columns are mixed into a much larger table, sorry vlookup :(
There are two columns that contain an ID# and a Category, one column with date and time stamp, and one that MAY contain a date and time stamp. (Column1,2,3,4 respectively)
Column 3 is when an action took place, Column 4 is the next time that action with the same ID# and Category has to have been completed by.
Essentially I need a cell(s) that will check for a date in Column 4, if there is one, find the next value in Column 3 that is greater than that of column 3 in the row with the value in Column 4, AND has the same ID, AND Category and compare them to see if it was done on time, preferably also by how much if it was late.
I'm able to find it almost with:
{=MAX(IF([#[Column 2]]=[Column 2],[Column 4]))}
Entered as an array formula, however that will only give me the last time that Category was given a "Next Due Date" and similarly with Column 1 replaced for Column 2 in the code sample above, I only get the last time that ID# was given a "Next Due Date".
As some Event ID# can be around for many days, and can run concurrently with others there's no guarantee all IDs will be grouped, nor Categories within those IDs.
It appears any attempts to add an AND(.. function break the array, though I'm not positive I'm not just messing up the placement of it.
It's perfectly fine if the solution involves creating helper cells.
The table is sorted chronologically by column 3 with the latest date at the top if that's any help.
TYVM for even taking the time to read this :)
Edit 1:
Sample Data
I've included an image with some sample data, to clarify the awkward sentence above. The orange arrows are pointing to two dates that would be compared and the event was late. the Green points to a group that was on time.
the categories are
Those two are being compared because each set has the same category, and ID. I hope that clears it up :)
You could try this formula (goes into column E):
=IFERROR( IF($D2<>"", LOOKUP(2,1/($F1:$F$2=$F2),$C1:$C$2), ""), "")
Very important here are the $ signs, as the searched area is supposed to move with the row. (Note: this formula goes into E2. You then copy > pastespecial (only Formulas) it into the rest of the column.)
My table looks like this:
A B C D E F
ID Category Start-date Due-Date Completion-Date ID+Cat. (Helper column)
The formula in F is simply =$A2 & $B2. The data starts in Row 2.
You will need to replace the columns with yours.
Please let me know if this is what you were looking for.
Good day to anyone who can help!
I have two long columns in excel of employee names stretching over 1000 in each one. They are not in any order.
One column shows a list of employees who worked for the company 10th January and the other column shows who works for the company 10th February. Now there will be leavers and there will be new starts so the names and amount of employees will have changed.
Is there a way in an excel spreadsheet to highlight this difference? Whether it highlights all the names that match or it highlights the names that don't. I need a way of finding out the difference between the two columns to show essentially who has left the company as keeping this record of who has left isn't available. All I can get is a list of current employees and when they have started. I need to find who has left in between the two dates.
I hope this makes sense.
Many Thanks
If each list contains only uniques, then Conditional Formatting with two rules may suit:
ColumnA: =COUNTIF(B:B,A1)<>1
ColumnB: =COUNTIF(A:A,B1)<>1
each applied to the occupied range of the respective column.
I would recommend using VLOOKUP twice - it basically searchs a given list for a value and returns something if the value is found. If it does not find the value, it returns #NV
So, you create two new columns: Number One contains a vlookup for january, the scond one for february.
The rest is conditional formatting.