Consecutive days absent in row - excel

I'm currently trying to make a comprehensive attendance list to be used by my colleagues. One of the questions I got from one of them was, if it was possible to highlight a name of a person who has been absent 3 consecutive times on a given day.
So, the way my sheet has been set up is that in row 1:1 there’s the dates of the lessons. They are held on Tuesdays and Thursdays. On row 2:2 it gives the day, so it goes from tue, to thu, back to tue until the end of the year.
Column A:A contains the names of all the students the caveat is that, the students that follow the lessons on Tuesday are different than the ones on Thursday, so the cells with the absence will never be adjacent to one another.
Now is there a way, with conditional formatting or other, that I can highlight a students name, who has 3 consecutive A’s behind their name?

Okay, I gather from your post that you are marking absences with an "a" in the cell of the absent date, and each student will only be expected to attend on either Tuesdays or Thursdays, e.g. every other cell in the row. I'm also assuming you'd want to continue highlighting for additional consecutive absences. This is what I came up with, hopefully it works for you.
Highlight the range of cells you want to apply the conditional formatting to.
Conditional Formatting -> New Rule -> Use formula to determine which cells to format -> =AND(B3="a",XFD3="a",XFB3="a")
This worked for me as demonstrated in the below image. Let me know if you need any adjustments and I'll see what I can do.
image

Related

Trying to correctly duplicate formulas keeping same cell range but adjusting date ranges

I'm trying to help someone with an Excel spreadsheet of sales figures. I hope this explanation is clear. She has a worksheet for each category of items she sells, such as clothing, shoes, furniture, &c. Each worksheet has a column, G, for Date Sold, and the data is in Date format.
On a summary worksheet, she wants to aggregate and analyze the data, and one thing she was doing manually was counting the number of sales of each category for each month (sometimes zero).
I helped her write a formula to pull the count from the clothing worksheet, for the month of March 2019 into a cell on the summary worksheet:
=COUNTIF($CLOTHING.G3:G502;">2/2019")-COUNTIF($CLOTHING.G3:G502;">=4/2019")
This correctly yields 5. Cool. But that is just one month, and we need twelve for each year, for multiple years, and we have six categories. So we'd rather not hard-code each formula every time we need a count.
When we tried to copy the formula into cells below (for April, May, etc), hoping it would adjust the dates, it wrongly adjusted the cell range to G4:G503. The cell range shouldn't change; the months should advance, but they did not change.
We've been trying different suggestions we found online, such as naming the range G3:G502 but it didn't like that. We got an error.
We both (obviously) have a limited knowledge of Excel. Please let me know what we're doing wrong OR if there is a better way to approach this, and how to do it step by step. Please ask any questions if my explanation is not clear.
Using your formula I would adjust it as follows:
=COUNTIF($CLOTHING.G$3:G$502;">="&DATE(2019;row(1:1);1))-COUNTIF($CLOTHING.G$3:G$502;">"&EOMONTH(DATE(2019;row(1:1);1),0))
Note the addition of the $ to the cell reference. This keeps either the column or row from change when a cell is copied.
Row(1:1) will return 1 in the first cell it it entered into and as it is copied down will increase by 1. Therefore it is important not to copied it down more than 12 rows from its initial entry point.
Note the year in the date is hard coded. Alternatively the year could be placed be place in a cell and a reference to that cell could be used in place of the hard coded year. That way in subsequent years, you would just change the value in the cell instead of changing your value in the hard coded formula.
Note this solution assumes January for the first cell and months following sequentially to December for the 12th cell.
I my system is configured to use , as separators instead of ; so it is possible I may have made a mistake with those in my edits.
Alternatively you could look at COUNTIFS. It is similar to COUNTIF but requires all entries to be TRUE for an entry to be counted.
=COUNTIFS($CLOTHING.G$3:G$502;">="&DATE(2019;row(1:1);1);$CLOTHING.G$3:G$502;">"&EOMONTH(DATE(2019;row(1:1);1),0))

How To Ignore Blank Cells for a Formula

I'm tracking hours for my company and I need to see the updated hours daily. I have everything formatted how I want it, except I want two columns to show how many hours over and under each employees current hours are.
What I have right now is
=(D3-C3)+(F3-E3)+(H3-G3)+(J3-I3)+(L3-K3)+(N3-M3)+(P3-O3)
But it is including all the empty cells (for days that haven't been worked yet) as a zero.
I want a formula that can allow me to ignore those blank cells until they have content.
I can't just use a SUMIF >0 function because I need to count the number of hours employees have MISSED (i.e. scheduled 12 hrs, actually worked 0).
Here's an alternate approach to #Tom's, though it works on similar principles. This one, however, relies on your ability to add a couple of 'HELPER' rows, above your current data.
I'm assuming that row 1 will alternate between saying "PROJECTED", and "ACTUAL".
I'm assuming that row 2 will be dates for that week, in Date format. So A2 will be Jan 1 2015, B2 will be Feb 1 2015, C3 will be Feb 1 2015, or however often the time blocks go up. The key here is that the PROJECTED columns and the ACTUAL columns will each need the date in them.
The formula to check the variance between that row's PROJECTED amount and that row's ACTUAL amount, only for dates prior to today, is (for row 3 and copied down, and assuming the data goes to column Z):
=SUMIFS(A3:Z3,$A$1:$Z$1,"PROJECTED",$A$2:$Z$2,"<"&TODAY())-SUMIFS(A3:Z3,$A$1:$Z$1,"ACTUAL",$A$2:$Z$2,"<"&TODAY())
This checks to see the value of PROJECTED columns for that row, where the date is less than today, and subtracts the value of ACTUAL columns for that row, where the date is less than today.
If you are looking to compare with something other than TODAY(), you can set up a cell to be your 'comparison point'. Manual type the breakoff period you are concerned with into that cell, and replace "&TODAY()" with, say, "&AA1" [assuming your breakoff point is entered in cell AA1].
As it stands, either a very long series of IF's and OR's or an array formula:-
=SUM(IF(OR(D3="",C3=""),0,D3-C3),IF(OR(F3="",E3=""),0,F3-E3),IF(OR(H3="",G3=""),0,H3-G3),IF(OR(J3="",I3=""),0,J3-I3),IF(OR(L3="",K3=""),0,L3-K3),IF(OR(N3="",M3=""),0,N3-M3),IF(OR(P3="",O3=""),0,P3-O3))
=SUM(D3:P3*ISEVEN(COLUMN(D3:P3))*(C3:O3<>""))-SUM(C3:O3*ISODD(COLUMN((C3:O3))*(D3:P3<>"")))
The second one must be entered with CtrlShiftEnter
Note that it could easily be broken by insertion/deletion of columns.

Count values in one column if dates fall in range

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")

How do I compare two columns of names in a spread sheet?

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.

Excel conditional formatting - highlight cells based on a value at the top of each column

I have a worksheet containing dates when people have attended training courses. Each column relates to a different course and may need to be redone at different intervals. The interval (number of years) is shown at the top of each column.
I want a rule so that each cell's formatting is based on the value at the top of its column, so I can have one rule for the the whole worksheet, rather than needing a new rule for each column. If the value in the interval cell is 'N' it means that course doesn't have to be resat, so no formatting required. Otherwise, if the date in the cell is older than the interval (in number of years), apply some formatting.
I've come close. I've got the rule =IF($C$5="N", ,TODAY()-($C$5*365)) and this works (where C5 contains the retraining interval). However I need the last step of being able to reference row 5 of the column the cell belongs to so I don't have to make a new rule for each column.
Course A Course B Course C
How often? N 2 5
fred 1/01/2010 1/01/2010 1/01/2010
John 1/01/2011 1/01/2011 1/01/2011
Mary 1/01/2012 1/01/2012 1/01/2012
You need to remove the absolute column reference by deleting the "$" in front of the "C"s:
=IF(C$5="N", ,TODAY()-(C$5*365))
Now the formatting will refer to whichever column it's called from. Just make sure that when you enter it the active cell is in column C.

Resources