# Solved: Excel Attendance (Formula Needed)

Discussion in 'Business Applications' started by KDthekid, Jul 28, 2012.

Not open for further replies.

Joined:
Jul 22, 2012
Messages:
4
Hello Everyone,

I need a formula that counts the # of days an employee did continuously come to work before they had an absence. The three different kinds of absences are Sick (S), Vacation (V), and Other (O). So for example if a person came to work Jan 1st -5th and was absent on the 6th. I need a cell that has "5" in it after P, O, or S shows up in cell (denoting how many days that person came to work in a row before they had an absence?)

I have attached a sample of how this was formulating in my head, but feel free to change this and make it how it should be.

If anyone can help, thanks in advance.

File size:
9.3 KB
Views:
110

3. ### samexcel

Joined:
Jan 16, 2012
Messages:
27
Hi KDtheKID

PLease attach the file once again so that i can try to solve your prob.

Joined:
Jul 22, 2012
Messages:
4
Sam I attached it thanks for your help.

5. ### samexcel

Joined:
Jan 16, 2012
Messages:
27
hi,

i have tried to find a solution for you, and uploaded the file please have a look and reply me if it work for you.

#### Attached Files:

• ###### For%20Tammy(1).xlsx
File size:
16.7 KB
Views:
78

Joined:
Jul 22, 2012
Messages:
4
Thanks Sam. But I needed something that counted the # of presents since the last absence.....if its even possible. Like if they came to work the 1st though the 5th then was absent on the 6th it would have 5 under a "# of Presents since the last absence" heading. Then say they came the 7th and missed the 8th a 1 would populate. I think it it may need a Today function maybe.....

But Thanks for this one too. I will use the one you attached above for just general attendance.

7. ### 20_2_Many

Joined:
Jun 29, 2012
Messages:
518
Apologies - I redid the format of the page, and I used only "I" for 'Came In'. You can add the the people you want in the joining columns, but I left the formatting (cell colors and adding the dates of the month, and weekends (which on this have to be 'I") up to you. Hope this is kinda what you meant. Macro to run is "ConsecutiveDaysIn"

File size:
45 KB
Views:
55
8. ### Garf13LD

Joined:
Apr 17, 2012
Messages:
455
Non Macro Solution

#### Attached Files:

• ###### For Tammy.xlsx
File size:
11.1 KB
Views:
65

Joined:
Jul 22, 2012
Messages:
4
Thank You Garf13LD! That is exactly what I needed! Thank You guys so much for solving this.

As Seen On