Counting number of days for each employee since last day of absence/tardy

nor1325

New Member
Joined
Aug 9, 2013
Messages
2
I am trying to get the correct formula to count the number of days it has been for each employee since the last occurrence of an absence/tardy. For each employee, starting with the beginning of the year, we mark and employee as Absent as an "A" or Tardy as "T". See below the examples.

...................................1/1 ....1/2 ....1/3 ....1/4 ....1/5 ....1/6 ....1/7 ....1/8 ....1/9 ....1/10 ....1/11 ....1/12 ....1/13

Captain America ................................A ..........................T .....................................T
Incredible Hulk.......................................................................................... A
Spider Man ................................................................................................................................A
Iron Man ....................................................T

( I added dots because it wouldn't let me space them out?)


We are keeping track so that employees have the ability to make up numbers because after so many occurrences they can become terminated. If an employee has about 60 days in a row without an infraction, that employee can deduct a day from their total on the year.

If anyone could give me a formula to use that would be great. Also to include a vlookup so that I could have their name as well with the number of days on a separate tab!

Thank you!!
 
Last edited:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi no1325, can you please attach a screenshot of your spreadsheet? From what you wrote I don't understand how it shoul look like. :)
Best
 
Upvote 0
Maybe this:

Formulas:

Code:
 A9-> =$A2

 B9-> =$N$1-MAX(MAX(INDEX(($B$2:$N$5<>"")*$B$1:$N$1,MATCH(A9,$A$2:$A$5,0))),$B$1-1)

Layout:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
1
Employee
01/jan
02/jan
03/jan
04/jan
05/jan
06/jan
07/jan
08/jan
09/jan
10/jan
11/jan
12/jan
13/jan
2
Captain America
A
T
T
3
Incredible Hulk
A
4
Spider Man
A
5
Iron Man
T
6
****************
********
********
********
********
********
********
********
********
********
********
********
********
********
7
****************
********
8
Employee
Days
9
Captain America
2
10
Incredible Hulk
3
11
Spider Man
0
12
Iron Man
9
****
****************
********

<tbody>
</tbody>


Markmzz
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,842
Members
449,471
Latest member
lachbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top